How do I bring application to foreground after a call?
In my app, I am placing a phone call due to which my app goes in background an开发者_StackOverflow社区d suspended. After disconnecting the call instead of my app coming in foreground, native phone app comes into foreground.
Is there any way by which my app comes into foreground (instead of native phone app) after disconnecting the call.
If there is no direct way, private api/methods also work as I am not going to submit this app on app store.
Thanks in advance
I doubt there is a way to do that, purely because an app in background is in a frozen state. What that means is that the app is not running but there is still memory which is allocated to it.
But, you can set a local notification in applicationDidEnterBackground: :)
Since this would break sandbox security (detecting call disconnect, covering up another app, etc.), I doubt there is any API, public or otherwise, on an unmodified stock OS, that would allow you to force your app to the foreground without any user interaction.
I think this is not possible via api's provided by apple.. there may be any other hacked way to do this
精彩评论