Remmyabhavan
Remmyabhavan

Reputation: 1719

Hide the url opened using action view in android

Hello In my android application i would like to open for suppose http://www.google.com using intent.But i would like to hide the link that is being passed. Is there any way that i can achieve this in android.

I am using the below code.

startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com")));

Please share your valuable suggestions.

Thanks in advance :)

Upvotes: 3

Views: 2126

Answers (2)

François Wauquier
François Wauquier

Reputation: 568

Hide the url bar of the browser after an intent is in the responsability of the page openend, not of the activty which launched the intent.

You just have to add this javacript to scroll down of 1px after a delay.

In fact, http://www.google.com is one of those site which do the trick.

Upvotes: 0

Michael
Michael

Reputation: 1496

Your intent starts a new activity and the new activity is beyond control if your app. Depending on the apps installed on the user's device, it might not even start a browser.

If you want more control over the way your URL gets rendered you need a tighter integration into your app. E.g. you can write your own browser easily. Create a new activity with a full screen android.webkit.WebView and call loadUrl().

Upvotes: 5

Related Questions