How do I bring application to foreground after a c

2019-02-25 13:46发布

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

3条回答
何必那么认真
2楼-- · 2019-02-25 13:51

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楼-- · 2019-02-25 13:54

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

查看更多
做个烂人
4楼-- · 2019-02-25 14:18

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

查看更多
登录 后发表回答