Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Developer
hari1
Posts: 64
Registered: ‎12-29-2012
My Device: None right now
Accepted Solution

App scaling issue

I submitted my html5 jquery BB10 app for approval 15 days earlier. But now I have got an email from Blackberry App World that my app looks to big on the dev alpha device. Here is the email:

-----------------------------------------------------------

I am testing your app on the BlackBerry Dev Alpha and when i open your app, the app doesn't appear properly as it appears too big on the screen. Please fix the scaling issue and make your app to fit the screen properly.

-----------------------------------------------------------

I tested my app only on ripple emulator and not on the simulator because my PC's processor does not have VTX feature to run the simulator. The app looks perfectly on the ripple emulator. So I need your help to test my app on your device and suggest me what is the problem.

Please help me solve this scaling issue.

Thanks

Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,

Re: App scaling issue

Are you using a framework?

If not, add this in your html

<script>
	var meta = document.createElement("meta");
	meta.setAttribute('name','viewport');
	meta.setAttribute('content','initial-scale='+ (1/window.devicePixelRatio) + ',user-scalable=no');
	document.getElementsByTagName('head')[0].appendChild(meta);
   </script>

As described here:

http://supportforums.blackberry.com/t5/Web-and-WebWorks-Development/How-to-set-up-the-viewport-for-a...

 

 

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Developer
hari1
Posts: 64
Registered: ‎12-29-2012
My Device: None right now

Re: App scaling issue

Thanks!
I forgot to use that.
Will inserting this code solve the problem?
Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,

Re: App scaling issue

It should! :smileywink:

And you can play with this

(1/window.devicePixelRatio)

to make it look bigger or smaller.

 

And don't forget to mark the post as a solution is that worked for you, so that others can benefit :smileywink:

 

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Developer
hari1
Posts: 64
Registered: ‎12-29-2012
My Device: None right now

Re: App scaling issue

[ Edited ]

Do I insert the code as it is or change the value of '(1/window.devicePixelRatio)'?

Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,

Re: App scaling issue

Try as-is first and adjust later if required
--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Developer
hari1
Posts: 64
Registered: ‎12-29-2012
My Device: None right now

Re: App scaling issue

Now I will submit my app again for approval. I actually uploaded five apps in last portathon without your suggested code.:Sweatdrop:

Developer
interfaSys
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,

Re: App scaling issue

If all your apps are based on the same model and you have a simple, signed app you want me to test, PM me and I'll take a quick look.

--
Olivier - interfaSys ltd
Developing for BlackBerry 10 devices using the Sencha Touch framework.
Developer
hari1
Posts: 64
Registered: ‎12-29-2012
My Device: None right now

Re: App scaling issue

Just sent a PM. Please check.