I implemented 2 LifecycleEvents Lifecycle.Event.ON_PAUSE and Lifecycle.Event.ON_START now these get triggered whenever I launch the camera Intent (which is logical in some way). Is there any way to prevent this?
Asked
Active
Viewed 85 times
2
-
2Try removing the lifecycle observer when you're launching the camera intent, and re-add the observer afterwards, or add a boolean flag to differentiate the events – Alvin Rusli Apr 10 '18 at 09:02
-
Was hoping for a cleaner solution, my app is rather large and has a lot of intents firing up (adding contacts, selecting picture from galery, opening webbrowser,...). But yeah I added a boolean flag, thanks! – Ferdau Apr 10 '18 at 14:04