Mobile - Screenshot Detection
Mobile - Screenshot Detection
Does anyone know how, on a mobile app (Android and iOS), you can detect if the user took a screenshot like in Snapchat?
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Mobile - Screenshot Detection
On most mobile platforms, it is extremely hard to impossible to get the unshared state of another app because of how it is setup. Each app runs in isolation for security, so unless the other app specifically shares that a screenshot was taken with other apps, I'm afraid you are likely out of luck.
About the only thing I could think of would be to continuously monitor the pictures folder, but that could cause false positives if they simply switch apps to the camera and take a regular picture.
About the only thing I could think of would be to continuously monitor the pictures folder, but that could cause false positives if they simply switch apps to the camera and take a regular picture.
The indelible lord of tl;dr
Re: Mobile - Screenshot Detection
Well I wasn't really thinking of another app taking the screenshot, I was more focused on taking a stock screnshot (IE holding the power button and the home button on some phones, for example). Similiar to how Snapchat does.
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Mobile - Screenshot Detection
Oh, you want your app to take a screenshot?
EDIT: And sorry, I am not familiar with Snapchat.
EDIT: And sorry, I am not familiar with Snapchat.
The indelible lord of tl;dr
Re: Mobile - Screenshot Detection
I want an event to happen when the user takes a screenshot. Basically whenever the user uses the stock way to take screenshots, it triggers an event. With Snapchat, you send your pictures to someone else, and if they take a screenshot, you are notified.
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Mobile - Screenshot Detection
You would have to check to see if there is a public event in the SDK for when this occurs. If there isn't, I am not sure how you could proceed.
The indelible lord of tl;dr
- KyleMassacre
- Posts: 573
- Joined: Wed Nov 27, 2013 12:42 pm
Re: Mobile - Screenshot Detection
Found this for iOS but not too sure on android
Doh, forgot the link
http://ios-blog.co.uk/tutorials/how-to- ... -snapchat/
Doh, forgot the link
http://ios-blog.co.uk/tutorials/how-to- ... -snapchat/