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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 64
Registered: ‎12-29-2012
My Device: None right now
My Carrier: BSNL
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
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

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.
Highlighted
Developer
Posts: 64
Registered: ‎12-29-2012
My Device: None right now
My Carrier: BSNL

Re: App scaling issue

Thanks!
I forgot to use that.
Will inserting this code solve the problem?
Developer
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

Re: App scaling issue

It should! Smiley Wink

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 Smiley Wink

 

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

Re: App scaling issue

[ Edited ]

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

Developer
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

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
Posts: 64
Registered: ‎12-29-2012
My Device: None right now
My Carrier: BSNL

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.

Developer
Posts: 817
Registered: ‎11-19-2009
My Device: Z10, Q10, 9900, 9790, PlayBook,
My Carrier: T-Mobile UK, Three, O2, Orange, Sunrise, Swisscom

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
Posts: 64
Registered: ‎12-29-2012
My Device: None right now
My Carrier: BSNL

Re: App scaling issue

Just sent a PM. Please check.