This is a read-only archive of the Framer Community on Facebook.

What is Framer? Join the Community
Return to index
Mike Johnson
Posted Feb 05 - Read on Facebook

Using phonegap for android I am trying to package a framer proto into an APK. Copying the files over to the www folder in phonegap works, but the scale of the prototype is way off.

I recently figured it has to do with the viewport scale and enabling viewportScalable for iOS. For Android though, I cannot figure out how to adjust the content scale.

Here's some screenshots. The screenshot from on devise is scaled up far too large, can only see the header bar.

I've tried variations of this to no avail:
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, target-densitydpi=medium-dpi, user-scalable=0" />

10 Comments

Matt Kay

Find out res bucket for target device e.g. Galaxy S6 (1440x2560) and design / prototype for this size> when ready use content scale .25 to scale down the prototype > wrap in phone gap - this worked for me - why? @1x = 360x640 which is scaled by 4 on device...

Mike Johnson

Ah, perfect. Setting Framer.Device.contentScale down to 0.33333 worked for my device. Awesome!

Jordan Robert Dobson

Remember each device is different so you'll get different results.

Mike Johnson

Yeah this is for a user test so it will only be on a single device.

Would there be a way to determine the contentScale for multiple devices within framer?

Jordan Robert Dobson

Check my Device Pixel Ratio module. Also Utils.devicePixelRatio() will help too.

Ryan Gambles

Mike Johnson when you did this successfully, did you have any issues with the Android compiler puking on the .coffee files? I can't seem to get an APK to build out of the box.

Mike Johnson

That didn't seem to be an issue at all... I'll check with the current version of studio maybe?

Ryan Gambles

Cleaned and rebuilt and the build succeeded, but now i'm just getting a blank screen. Things are working on ios. I'm sure I'll figure it out.

Mike Johnson

Strange, I haven't noticed an issue between iOS and Android besides the device scale stuff.

Ryan Gambles

Yeah, it is odd. And strangely, it (the build failing) happens inconsistently. Maybe it's an issue with Cordova 6.0? Anyhow, a solution is just to compile the coffeescript to js and copy that across. Eventually, I suppose I'll write a task to do that for me.

Read the entire post on Facebook