I am working on a mobile app using xamarin forms, is it possible to detect swipe gesture in android for screenshot or click of lock screen or home screen ?
If it is possible via objective C/swift/java then it would also be possible through Xamarin.
I do not believe you can setup a swipe gesture / click during the Lock Screen as it's a separate Activity in a different process(System app). You also can't replace the lock screen with a user application.
You can control some of this via the
Device Admin API:
However that's only for the opposite of what you want(Probably to know if the user finished the lock screen).
You can instead listen for the
ACTION_USER_PRESENT or the fairly new
ACTION_USER_UNLOCKED broadcast via a
You can use
Darwin Notifications - https://developer.apple.com/reference/corefoundation/1666719-cfnotificationcenter
You can check the following events:
com.apple.springboard.hasBlankedScreen- When the screen goes blank (One of a few times it will)
com.apple.springboard.lockstate- What state the lock is in(locked/unlocked)
com.apple.springboard.lockcomplete- The device locked