I am building an Unity app where in the user is asked for time sensitive approval through FCM Cloud messaging. I am able to perfectly handle situations when the app is in the foreground or when it is in the background. However when the app is closed or the device is locked I would need to launch the app directly once the FCM notification is received. I am struggling to get this done, because when the app is not running the FCM notification stays in the system tray and does not open the approval scene in my app. The notification remains queued and triggers the approval only once I launch the app but since this is time critical approval so this behavior will not suffice. Please suggest how this scenario could be dealt with. The basic ask is to launch my closed app as and when I receive a FCM notification without the user having to clink on the notification.
No one will want your app to auto start, without users permission.
As soon as you force doing so, you will face rage uninstall, followed by negative reviews.
Background notifications is the best you can do, without annoying the user, providing user did agree for receiving notifications.
Thanks for your reply. The necessary permissions from the user will be sought before hand. I do understand that automatically launching the app while the user may be busy doing something else is not the best UX design but the fact that the approval is time critical so the use case dictates this intrusion. Alternatively I was thinking of a workaround where the notification stays in the background(does not launch the app) but emits a beep/custom sound till the notification is click on (thus launching the app). Unfortunately, unable to do that either as I an unable to get the custom sound to play as well. Any suggestions or a better way to handle this use case other than just let the notification languish in the background?
Mobile users have full control over notification system.
That means, user decides what he permits to show in notifications.
Also, user defines, what type of sound or not should be a notifications.
To be honest, I don’t even know, if mobile devices a allow to play a custom sounds as a notifications. But it would be definatelly messy and gets quickly annoying. And you will can nothing about the fact, if user silences the notifications, or mute sounds.
I don’t know what you exact trying to do, other than time critical app, but seems your features that you try to implement, will be potentially extremely annoying to users.
On my mobile I got few apps with notifications in background. And I like these are subtle, and doesn’t force me to close intruding apps, while I do something critical, or sensitive. People are enough conscious to take control, if they want to open app, or not, when the see a notification.
Also, imagine some use mobile wĂłr business, and your app start intruding in important meeting. Same applies to students, which are busy with their studying.
Surely this will lead to uninstall and instant negative comments.
You really need start thinking about responsibility and consequences, on what you try to do.
Yeah, they’ve already said that they’ll get appropriate permissions. They’re not trying to take control away from users, they’re trying to allow users to have the app behave in a certain way in a use case where that happens to be desirable.
Custom sounds are allowed, with some restrictions which shouldn’t be an issue here.
As for answering the question, assuming you’re targeting Android Google has specific design to handle “time-sensitive notifications” and I think you’ll just have to do what they recommend. Both Google and Apple are pretty protective of the OS-level user experience for good reason, so I doubt that they’ll let an app fundamentally take over without user input, even with user permission.