hybrid mobile app viewport - viewport

im making hybrid app only for android, and designer gave me 480px(minimum size) layout.
i declared meta view port like this...
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0, target-densitydpi=high-dpi " />
also the my css is
body {min-width:480px; height:100%;}
the problem is when i test on my phone, almost every browser shows perfectly! But Except Mobile Chrome Browser. it shows layout bigger and overflow on the screen...
what did i have wrong ?

To my understanding, Android devices don't use the viewport. iOS devices do. You CSS is actually taking over. So depending on your device's initial width, smaller than 480px, your layout will overflow because of the min-width. Your best bet might be to use the min-width:320px and width:100%.
Try that.
What do you mean by the "mobile Chrome browser". You mean the native browser that comes predownloaded on the phone or the Chrome browser you download from the Play Store?

Related

On screen rotation iOS webapp changes viewport and crashes

I've created a mobile webbased game and use the "Add to homescreen" feature to allow users to add it as an app to their iOS devices.
However, recently it started malfunctioning. It has always worked without problem but started acting up possibly after the iOS 8.3 update. This is the code in my head, which has not been changed recently so should not be the problem:
<meta name="viewport" content="width=590px, user-scalable=0">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
When I get to the login screen it works without problem, however after logging in in landscape there are suddenly margins to the left and right. If I log in in portrait there are no margins. If I rotate the phone from landscape with margins to portrait it displays normally, if I rotate it back the margins suddenly increase by a lot and if I then try to rotate the device again it crashes.
I have taken some screens to show the problem:
http://i.imgur.com/o2Jr8af.png
http://i.imgur.com/Q6ZOXuj.png
http://i.imgur.com/7bGoc42.png
http://i.imgur.com/Mh8hsml.png
After that last screenshot the webapp just crashes. It only shows this behaviour in the webapp, if I access the game through Safari, my Android app (which loads the website in WebView) or the desktop with a simulated user-agent the website functions properly.
I've tried deleting the webapp, rebooting my phone and adding it back to my homescreen to no avail. I first guessed it was a caching issue but that should have been then resolved after viewing the website correctly in Safari.
For those wanting to try themselves, the game is www.reincarnationgame.com

Ember and Zurb Foundation 5 on Heroku deployment does not recognize mobile device.

I have a simple Ember app I've made to learn Ember and I deployed it to Heroku here. When I view it on my desktop and resize the browser window it adjusts accordingly to its mobile view. However, when I look at it on my phone it only displays it as a normal desktop page.
Is this an issue with Ember, Heroku, or Foundation 5?
You need to add to the head of your app.
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
I can see that you have it included in your app on github but in the browser that meta tag is not being displayed.
I have an ember app using foundation on heroku here. It is working well on my phone. The code is here.
Cheers

jQuery Mobile web app saved to homescreen on windows phone icons

I have a web app with apple icons that works well on ios devices.
A user has added the app to the homescreen of his windows phone. but how to i set the icon/start image.
both big and small accordingly.
https://skydrive.live.com/?cid=a280c0590d6c6362&id=A280C0590D6C6362%21834&sff=1&authkey=!AAq6YDSK2FwJu9c
the web app
[redacted]
google search appears fruitless.
found this on another website that had mobile functionality.
<meta name="msapplication-TileColor" content="#ffffff"/>
<meta name="msapplication-TileImage" content="img/favicon-msapplication-tileimage.png"/>

Windows Phone viewport meta tag

I'm currently working on a mobile website. Everything is working fine on both iOS and Android, i'm however experiencing problems with the viewport meta tag on Windows Phone when trying to set the width of the viewport to 640px. I'm using :
<meta name="viewport" content="width=640,user-scalable=no"/>
However it seems that whenever you are trying to set a viewport greater that 480px Windows phone automatically applies to default viewport (1024px).
Any Workaround ?
I haven't had much success with <meta name="viewport"> and Windows Phone 7.5 unless I set width between 320 to 480 (inclusive). If I want to set it outside of that range it seems to just default to 320.
I tried just using <meta name="MobileOptimized" content="640"> and that worked perfectly. It behaves like <meta name="viewport" content="width=640,user-scalable=no">.
According to this article and the article linked to by in Mikael Koskinen's Answer the range should be 320 to 10,000 but I haven't been able to reproduce that.
The Windows Phone team blogged about Windows Phone browser viewport some time ago. They don't have examples for widths' greater than 480 but maybe you can find some tips from there, like using the dynamic viewport sizing.
Note that the blog post applies to Windows Phone 7.5 (Mango) only.

Zoom in/ zoom out within web-browser on windows phone 7

I've built an example with web-browser in windows phone 7. When I load an html file which created by myself, I can double click on web-browser to zoom in/ zoom out the content. But, when I load an web-page (ex: google.com) I can't.
I uploaded my example to my skydriver account. You can't get it at http://cid-b65eb4d185de7cfc.office.live.com/self.aspx/.Public/Shared/Sandbox.WebBrowser.zip
If you known the reason why, please help me.
I think the reason lies in the meta tags within the HTML headers from Google.
I'd guess that Google have fixed the viewport to not allow zooming:
<meta name="viewport" content="user-scalable=no" />
See this post http://blogs.msdn.com/b/mikeormond/archive/2010/12/16/displaying-html-content-in-windows-phone-7.aspx

Resources