udamken / mindbell

Aims to give you a support for staying mindful in a busy life - for remembering what really counts ... for more information see
http://dknapps.de
Apache License 2.0
8 stars 4 forks source link

Auto-stopping meditation no longer works starting with Android Q (API 29) #78

Open udamken opened 4 years ago

udamken commented 4 years ago

https://developer.android.com/about/versions/10/privacy/changes

Restrictions on starting activities from the background Starting in Android 10, the system places restrictions on starting activities from the background. This behavior change helps minimize interruptions for the user and keeps the user more in control of what's shown on their screen. As long as your app starts activities as a direct result of user interaction, your app most likely isn't affected by these restrictions.

To learn more about the recommended alternative to starting activities from the background, see the guide on how to alert users of time-sensitive events in your app. <<

https://android.jlelse.eu/preparing-your-app-for-android-q-199e0f8edfc6

This does not depend on target sdk but hits all apps - thanks so far.

Auto-stopping meditation was done by starting MainActivity with extra information to stop meditation. When MainActivity starts with this argument it behaves as if the user pressed stop meditation. This switched off the countdown screen and reschedules next reminder.

Due to prohibiting starting MainActivity from starting the meditation is not stopped and the next reminder does not get scheduled.

udamken commented 3 years ago

Bypass: check "keep screen on" - this allows MainActivity to be started to stop the meditation