Reputation: 281
I want to open an app over push notification without any user interaction.
The concept of my need is following. User may receive push notification from server that time I want to open an app with some alarm tone.
Normally, alarm is playing when app is in background but I need a way to open as well without any user interaction on push alert.
I have reviewed many Android apps has this feature. Is there any luck to implement in iOS?
We can easily open an application by tap on push alert but I want to open an app automatically over push alert.
1. Do we need to create/add any extension to achieve this kind of thing?
Please help me out.
Upvotes: 1
Views: 2226
Reputation: 1
its possible for an activity to be launch from backgroud... use case example is (voip feature phonee call etc) need to make custom class and make as a permission foreground activity
Upvotes: 0
Reputation: 16180
If you have any requirements like this, save the status & show the appropriate UI when the user opens the app.
NB: IDK why the android still allows this. This is some NOT good stuff. Better you avoid that.
Upvotes: 1
Reputation: 192
I don't think this is possible. But we can launch the application from Mac terminal so if write the bash script when you get the notification then may be you can launch application. The tool used are CFGUtil and Apple Configurator 2.
Upvotes: 1
Reputation: 50
It's Not possible in iOS, to force launch an application. Once the notification comes from the server. The only way to launch app is tap on notification bar.
Upvotes: 1
Reputation: 2001
The documentation is here: https://developer.apple.com/documentation/usernotifications
I cannot find such a way of doing it. So if you wanted to create your own extension or something running in the background I've some bad news for you: you can't. You could only run a listener for such a feature and as by definition you are in the background Apple would have to explicitly allow it.
Upvotes: 1
Reputation: 911
I don't think this is possible. I've never heard of such a "feature", and I'm honestly surprised Android allows this.
I don't ever want an app to open to the foreground without my permission (possibly stopping whatever I was doing).
If it did, I would categorize it as a virus and a security breach.
My instinct says that Apple feel the same way and would never allow such a thing.
Of course, apps open all the time in the background to execute code, but an app's coming into the foreground must be started by a user's explicit action.
Upvotes: 3