manju
manju

Reputation: 847

How to invoke browser without losing browsing state?

I have written an activity that has 2 image buttons (1 for messaging and another for browser). On click on each will start messaging and browser android activities respectively.

My question is: whenever I start my app and click on any of the buttons say browser button for example, and after it starts the android browser app, and it allows me whatever to browse in this time if I press the home button on android emulator and again if I start my app and select the browser button in my activity as usual the browser get started from the beginning rather than starting form where I left previously.

Should I start a service to call browser activity or should I set some flags while calling android browser activity?

Upvotes: 1

Views: 133

Answers (1)

Ryan Reeves
Ryan Reeves

Reputation: 10229

You might try setting the FLAG_ACTIVITY_REORDER_TO_FRONT on your browser intent and see if it's the behavior you're looking for. This way if the browser already exists, it will just reorder the browser activity to the front and not launch a new browser.

Upvotes: 1

Related Questions