How do I bring application to foreground after a call?

怎甘沉沦 提交于 2019-12-02 01:00:18

问题


In my app, I am placing a phone call due to which my app goes in background and 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


回答1:


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: :)




回答2:


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.




回答3:


I think this is not possible via api's provided by apple.. there may be any other hacked way to do this



来源:https://stackoverflow.com/questions/4060155/how-do-i-bring-application-to-foreground-after-a-call

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!