Starting an ACTION_VIEW activity to open the browser, how do I return to my app?

前端 未结 4 933
终归单人心
终归单人心 2021-01-11 11:43

In my app i need to open the bank\'s page, to make the user able to pay. Reading the Android documentation I see that I should use an ACTION_VIEW (and not a Web

4条回答
  •  粉色の甜心
    2021-01-11 12:17

    Actually you are able to return to your calling activity taking a different approach. If the webpage you are calling is handled by you or allows you to assign a callback when the user finishes doing dome processing, then you can set that callback to a URI, and assign that URI to your calling activity, if the activity launch mode is singleTask, then you're going to be able to resume your activity.

    The only thing that I haven't resolved is that I don't know how to remove the browser from the stack once it returns to your calling activity. I want to accomplish this because once you leave your app, android pops the browser activity to the front, forcing the user to finish it by himself.

提交回复
热议问题