2

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?

Ferdau
  • 1,524
  • 1
  • 12
  • 21
  • 2
    Try 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

0 Answers0