Adding Check Plugin action that can be used to make sure the component is avaliable before callings its actions
Added the possibility to detect Screen Shot for iOS and Android.
However since Android don't have a default event for taking a ScreenShot, the option commonly used (Even by Snapchat) is to create an observer that keep checking if while the app is opened any file created have the name 'screenshot'.
Personally I don't think it is a very good way to do it, but is the only option I found. And looks like the Big Ones (Like Snapchat) also use it, so I accepted it for now at least :)
Since it needs to check for new files you will need the permission to Read External Storage, which is handled by the app.
I made this option in android optional, so you can choose to use it or not.
Right now in the app you will be able to:
-Prevent the user from taking screenshots in android only.
-Detect a screenshot taken by an User in both, iOS and Android.
-Set the default behavior for all app or for a specific screen
-Set the default callback for all app or for a specific screen
Check the demo Module on How to use it.
Updated the way of using it.Now you set the default behavior you want for all your application. Using the OnApplicationReady:
Then you can override the option is default screens using the OnInitialize and OnDestroy of this giving screen.
For example, let's just enable the screen shot functionality for just one screen.
In the screen OnInitialize function we place:
This will enable the functionality.
Then to go back to the default behavior we need to Disable it again on the On Destroy.
So on the OnDestroy action of that screen, we place: