Hello. I am learning Android development.

I have a small app where the user can pick a sound file and set a delay in minutes for an alarm to go off.

I want the app to have a huge ‘dismiss’ button, to make it easy for people who are distracted to shut off the alarm. Like people cooking, in the middle of folding laundry, doing planks at the gym…

The problem that I have ran into is that in Android 10 it seems like they have made it impossible to launch my ringing screen from the broadcast receiver if the app is closed.

Of course I have read this a million times and searched around stack overflow for a clean way around this limitation, but I haven’t found one.


Right now, my app is sort of working. I launch a high priority notification, but I think it is really annoying to have to tap the notification so that the android system will then launch my fullscreen activity. I just want it to launch the activity. As a developer, fiddling with the notification builder when I don’t want to and shouldn’t need to sucks, and as a user I hate that it takes two taps to dismiss the alarm. Again, the two taps are 1.) tap the alarm so that my activity will be launched and 2.) tap the dismiss button on my alarm.

I haven’t learned about services yet, but it seems like even if I use a service for receiving the AlarmManager broadcast, that would still be considered the background.

I understand where Google is coming from, because an app that stops the user from doing whatever it was that they were doing and forcing them to deal with some activity that just popped up out of nowhere would be annoying. However, for an alarm app like this, I think that is kind of the point… I don’t want to have to disable all of my user’s active timers if they shutdown the foreground activity that they used to activate the timer.

This is frustrating because I was slowly chugging along, learning Android development building this app that I wanted to make (and that at least I will certainly use for remembering to pick up my laundry, calling somebody back in 15 minutes, draining out the noodles that I was supposed to boil for 8 minutes), and now it seems like it’s literally impossible to make the app as I want it unless I use an old API version somehow?

Has ANYONE found a way around this that will still allow their app to be published on the app store? Has anyone heard anything about Google reversing their decision to make it way more difficult than it needs to be to launch an activity from the background?

[Edit: I had a really good impression of Android development up until now too…]

Leave a Reply

Your email address will not be published.