I think it would make sense to make Fotoapparat lifecycle-aware.
The following dependencies could be added:
lifecycle-common-java8lifecycle-extensions to gradle.
Then the Fotoapparat could receive an additional lifecycleOwner: Lifecycleowner constructor parameter and implement LifecycleEventObserver. This way the Fotoapparat could handle itself lifecycle changes, without the need to override onStart/onPause
I think it would make sense to make
Fotoapparat
lifecycle-aware. The following dependencies could be added:lifecycle-common-java8
lifecycle-extensions
to gradle.Then the
Fotoapparat
could receive an additionallifecycleOwner: Lifecycleowner
constructor parameter and implementLifecycleEventObserver
. This way the Fotoapparat could handle itself lifecycle changes, without the need to overrideonStart/onPause