0

I am developing an application in that I want to open url(www.google.com) with android default browser(com.android.browser). After some time I want to close or hide the browser and show my application to the user. I tried the following

  • Broadcast Receiver
  • Timer
  • Handler

None of them is working. FYI -- I am starting the browser from fragment. I want to show the same fragment after closing or hiding the browser. The broadcast receiver is working but it is opening the initial fragment but I want the same fragment when I start the browser.

Please any one help me

Krishna
  • 4,892
  • 18
  • 63
  • 98
  • 1
    possibly this helps you Using Alarm Manager. http://stackoverflow.com/questions/6609414/howto-programatically-restart-android-app – Jawad Zeb Jan 07 '15 at 10:41
  • Perhaps you could use something like yEd to draw a flowchart of what you're expecting to happen, it's a bit hard to visualize or at the very least differentiate between fragment1 and fragment2. So you have a WebView inside a fragment to show a browser element, but when you close this fragment you want the same fragment to open? If so, you could pass the URL via intent.putExtra("url", URLString) in the onCreateView of the fragment. – G_V Jan 07 '15 at 11:25
  • @JawadZeb Thanks for your comment. It is working but one concern I want to show my activity to front. But this code is restarting my application – Krishna Jan 07 '15 at 13:00

0 Answers0