Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

How to get notified when app with camera displayed goes to background or gets killed

$
0
0

Hi,
in my app I have an Android activity which creates another activity to display camera and take a picture. I use StartActivityForResult to start camera and then OnActivityResult to receive the picture if succeeded. The problem is, when the camera is displayed and the app goes to background (user pressed home button for instance), I don't get any notification. Neither Application.OnSleep nor Activity.OnPause is called. This way the user is able to press the stack button and swipe the app off screen, effectively killing it without the program being notified.
How do I properly handle this situation?


Viewing all articles
Browse latest Browse all 89864

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>