Skip to content Skip to sidebar Skip to footer

How To Hide Address Bar In Android Phonegap Without Using The Domain Whitelist?

Can anyone tell me how to hide the address bar in the android phonegap.I am trying to capture image but the image functionality is not working in the phonegap.where as the same is

Solution 1:

Yes, that's possible with this little Javascript:

<scripttype="text/javascript">// When ready...window.addEventListener("load",function() {
// Set a timeout...setTimeout(function(){
  // Hide the address bar!window.scrollTo(0, 1);
}, 0);
});

You should add it somewhere in the <head> of your HTML code.

The window.scrollTo method is the key to hiding the address bar. The wrapping setTimeout function is required by the Phone to properly hide the address bar – not using setTimeout will cause problems.

When you want to support adding webpages to the homescreen on the iPhone as well, you'll need to add the following <meta>-tag too.

<metaname="apple-mobile-web-app-capable"content="yes" />

This will also hide the toolbar at the bottom of the screen on the iPhone (only when added to homescreen by user).

or with using ChildBrowser PhoneGap plugin

Post a Comment for "How To Hide Address Bar In Android Phonegap Without Using The Domain Whitelist?"