kraigs-android / kraigsandroid

Kraig's android applications
26 stars 26 forks source link

On Android 10 it doesn't show a full screen alert automatically #140

Closed Victor239 closed 4 years ago

Victor239 commented 4 years ago

You have to go to your notifications to find the alarm, then clicking on it opens the full-screen alarm.

kraigs-android commented 4 years ago

This is a new restriction in android 10. Background services are no longer allowed to open a window that takes focus while the user is using the phone. https://developer.android.com/guide/components/activities/background-starts

The only reasonable alternative in this case is a high priority notification that temporarily pops up at the top of the screen. However, it should still work when you're not using the phone and the screen is locked.

Victor239 commented 4 years ago

Ah I see, that's unfortunate. Well a high-priority notification is better than nothing, right now I even have to scroll down a bit to find the alarm notification amongst my others.

kraigs-android commented 4 years ago

This app defaults to high-priority in the last couple versions, but if you ever changed your phone's notification settings, the app settings may be overridden. If you select the app in your phone's Setting > Apps menus there should be a section to customize all of its notification settings.

Victor239 commented 4 years ago

I guess that would be the "Allow interruptions" and "Override Do Not Disturb" options? Don't see anything else related to high priority there, seems Android 10 reduced notifications settings a bit if there's only 5 options.

kraigs-android commented 4 years ago

Yes, 'allow interruptions' should be on by default for high priority notifications unless one of the higher level preferences was changed (and is probably the one you are interested in here). 'override do not disturb' is never on by default (as far as I know), but doesn't really do anything in this context anyway. The notifications that appear have attributes associated with them including sounds and vibrations which can be blocked when 'do not disturb' mode is enabled. This app doesn't use those attributes, though. The sounds and vibrations that it makes are done from the background service that generates the notification and 'dismiss' window. That service explicitly ignores the 'do not disturb' setting.