PDA

View Full Version : Fullscreen / no search bar for my mobile app?


ABC123

pcaspa
06-12-2013, 10:53 PM
Hi All,

I'm working on a mobile app that users will access via a link on an email including page variables. So far so good except I can't get rid of the browser search bar, I'm looking for a native app like experience for the user, as much as possible. I'm also looking for a solution that will also preserve the page variable.

Any ideas?

Thanks
Peter

Clipper87
06-13-2013, 07:53 AM
You're looking for a chromeless browser. I have yet to play with it but in the appstore (Apple) there's gardenweb for generic use, for creating your own native app see these 2 videos on PhoneGap/Cordova from Bob Moore to get started: http://youtu.be/GiL6ljY3hrI & http://youtu.be/jnKrAc2p6XQ The idea is that you wrap your webapp in a native chromeless browser.

pcaspa
06-13-2013, 09:11 AM
Hi,

Thanks for the info, hope to go down the PhoneGap path soon but for now I'm exploring what I can do as is. I found this:-

<meta name="apple-mobile-web-app-capable" content ="yes">

works great for apple once you have clicked "Add to Home Screen".

Cheers
Peter

Clipper87
06-13-2013, 12:27 PM
The trouble with that is that while in the app you get a phonecall & then afterwards you reselect the app's icon you start using your app from scratch. Don't know how iOS7 will deal with it because that iOS7 is said to have multitasking features.

christappan
06-13-2013, 02:48 PM
I'm not on the v12 beta, but this (from http://stackoverflow.com/questions/9678194/cross-platform-method-for-removing-the-address-bar-in-a-mobile-web-app) works:


<!--to hide address bar on mobile-->
<script type="text/javascript">
function hideAddressBar()
{
if(!window.location.hash)
{
if(document.height < window.outerHeight)
{
document.body.style.height = (window.outerHeight + 50) + 'px';
}

setTimeout( function(){ window.scrollTo(0, 1); }, 50 );
}
}

window.addEventListener("load", function(){ if(!window.pageYOffset){ hideAddressBar(); } } );
window.addEventListener("orientationchange", hideAddressBar() );
</script>

pcaspa
06-13-2013, 08:52 PM
Hi,

I've tried a number of variations on the window.scrollTo(0, 1); idea but none seem to work on my iPad2. Does this actually work on iOS6 devices?

GGandhi
06-13-2013, 10:36 PM
i am not on 12 either, but googling got this answer(s)

http://davidwalsh.name/hide-address-bar
http://stackoverflow.com/questions/1049578/iphone-hide-address-bar-on-page-load

hope any of these gives what you are looking for.