Screen Resolution / scaling Issue - Build 2016.08.03 Lumia 640xl

Screen Resolution Issue - Build 2016.08.03 Lumia 640xl.

I downloaded a the Corona Business App and threw it in a corona cards app.

I deployed it to my phone 640xl  and the app is 1/4 the size of the screen.

Is there a fix for the scaling issue ? Im trying to work an app for a local business for all platforms.

and the phone had win 10 phone anniversary update.

thanks

larry

Anyone know how to fix these.

Is this a windows things or a corona thing?

thanks

Larry

I assume you are talking about this sample project, right?

   https://github.com/coronalabs-samples/business-app-sample

Corona for WP8 doesn’t support the “adaptive” scale mode which the above project uses.  Corona built Mac and Win32 desktop apps do not support “adaptive” mode either.  When attempting to use “adaptive” mode on these platforms, Corona will not scale your content and render in pixels instead.

When you create your Corona WP8 project in Visual Studio, notice that it comes with a “Hello World” like project to it.  That renders correctly on your Lumia device, right?

You can use “letterbox” or “zoomEven” instead of “adaptive”. You might have to adjust a few things to adjust for the phone being taller than the default settings.

Try using:

      scale = "letterbox",       width = 320,       height = 480,

instead of

      scale = "adaptive"

I think I’ll update the sample to position things based on the device’s shape so you can use letterbox, but it likely won’t be until tomorrow before I can update the sample.

Rob

Yeah what throws me offisthat the Emulator works finebut scale is not correct on the device. I left my cord at home ill try this tonight and get report Back here. thanks much… I dont know why in the heck i didnt think about this.

Larry

Larry, just to double check, I recommend that you create a new WP8 project in Visual Studio and run it as-is on your Lumia 640XL.  This project comes with a built-in Hello World app.  If it runs on your device without any scaling issues, then this is simply an issue with that demo project requiring “adaptive” mode to be supported on that platform (which it’s not in this case).

If you *do* see scaling issues with the Hello World project, then you may be running into the issue mentioned in the link below, which can happen if you’re running with an older build…

   https://forums.coronalabs.com/topic/62285-windows-phone-10-black-borders

Regarding the above link, there is a scaling bug on Microsoft’s end which only happens with \ *Silverlight * built apps running on a \ *Windows 10 Mobile * device that has a \ *virtual/onscreen navigation bar *.  Basically, the operating system returns the wrong information about the pixel resolution of the screen to Silverlight built apps, making it impossible to render to a “DrawingSurfaceBackgroundGrid” at the correct resolution.  The newest daily builds work-around this by detecting this discrepancy in Microsoft’s APIs, and if detected, Corona will refuse to render the “DrawingSurfaceBackgroundGrid” and render to a “DrawingSurface” instead, which will allow Corona to render fullscreen but be unable to render at 60 FPS (it’ll be around 30 FPS).  It’s unfortunate, but we couldn’t find any other reliable solution.

Thanks - but mine looked way worse than that… I also had deployment issues and could not install other apps ( although it did install the app in VS 2015 ).

So i decided to to a complete restore ( not knowing it was gonna go back to win 8.1 update 2 ).

As soon as it did i noticed everything was much bigger and ( icons fonts etc… ).

So this is what i am thinking… in the windows 8.1 phone and windows 10 you can set a setting on the phone to scale the app icons and fonts smaller. I’m going to try this with and without this option set and get back with you ( after all update  are complete )

Larry

ok so i have the latest version of corona windows phone and . VS 2015, Latest version of windows phone 10 ( as of today - fresh wipe and install).

I created a new Corona Cards app I did not change anything in the app. and pushed to my phone ( hello world ).

The hello world is 1/3 the size of my screen. located at the bottom left of the screen.

It sounds like a scaling bug on Microsoft’s end then.  They’ve blogged about it last year (link below), but it sounds like they never fixed it.  And I assume you did these updates via the phone and didn’t use the older insider preview updates which were buggy.

   http://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_update/lumia-640-users-check-here-for-windows-10/e45ddf8c-5660-44bf-aa16-4a2d23c59883

If this is the case, then I’m afraid there is not much more we can do on our end.  The issue here is that operating system is returning the wrong resolution and scale factor for the device.  If Corona can detect the discrepancy, then we’ll work-around it.  But if we can’t detect it (all of the OS APIs lie about the resolution), then we have no choice but to accept that the OS is telling the truth.

I remember this being the case for the Lumia 535 after updating it to Windows 10 Mobile.  For that device, I posted a C# work-around which identifies that specific device, and if detected, disables background rendering… which unfortunately makes 60 FPS impossible.  I posted this code here…

   https://forums.coronalabs.com/topic/62285-windows-phone-10-black-borders/?p=324087

You could do the same for the Lumia 640XL if you want.  It’s not a great solution, but I’m not sure what else we can do.

And as a quick test, you can set background rendering in C# to false to see if it’ll render fullscreen (no scaling issues).

   fCoronaPanel.BackgroundRenderingEnabled = false;

sounds good, yeah i had not had time yet to read the above, but ill check it all out. and give it a try.

Thanks

Larry

Yep that was it… added check for modelName.StartsWith(“rm-1064”)  and it worked…

thanks now i can progress

Glad I could help. It’s not the most ideal solution, but I’m not sure what else we can do about it. As you saw in that Microsoft blog post, it was a confirmed Microsoft bug that they apparently never fixed.  :-/

Interestingly enough, we’ve noticed that this scaling bug only seems to happen when side-loading an app onto a Windows 10 Mobile device.  That is, if your app is installed via Microsoft’s app store, the scaling issue won’t happen.  Except for the Lumia 535… which has scaling issues regardless of how it is installed.

We don’t have a Lumia 640XL to test with, but you can double check if the scaling bug won’t happen with apps installed from the Microsoft app store by downloading our “Corona Cannon” app to your device.

   https://www.microsoft.com/en-us/store/p/corona-cannon/9nblggh5pwvn

Anyone know how to fix these.

Is this a windows things or a corona thing?

thanks

Larry

I assume you are talking about this sample project, right?

   https://github.com/coronalabs-samples/business-app-sample

Corona for WP8 doesn’t support the “adaptive” scale mode which the above project uses.  Corona built Mac and Win32 desktop apps do not support “adaptive” mode either.  When attempting to use “adaptive” mode on these platforms, Corona will not scale your content and render in pixels instead.

When you create your Corona WP8 project in Visual Studio, notice that it comes with a “Hello World” like project to it.  That renders correctly on your Lumia device, right?

You can use “letterbox” or “zoomEven” instead of “adaptive”. You might have to adjust a few things to adjust for the phone being taller than the default settings.

Try using:

      scale = "letterbox",       width = 320,       height = 480,

instead of

      scale = "adaptive"

I think I’ll update the sample to position things based on the device’s shape so you can use letterbox, but it likely won’t be until tomorrow before I can update the sample.

Rob

Yeah what throws me offisthat the Emulator works finebut scale is not correct on the device. I left my cord at home ill try this tonight and get report Back here. thanks much… I dont know why in the heck i didnt think about this.

Larry

Larry, just to double check, I recommend that you create a new WP8 project in Visual Studio and run it as-is on your Lumia 640XL.  This project comes with a built-in Hello World app.  If it runs on your device without any scaling issues, then this is simply an issue with that demo project requiring “adaptive” mode to be supported on that platform (which it’s not in this case).

If you *do* see scaling issues with the Hello World project, then you may be running into the issue mentioned in the link below, which can happen if you’re running with an older build…

   https://forums.coronalabs.com/topic/62285-windows-phone-10-black-borders

Regarding the above link, there is a scaling bug on Microsoft’s end which only happens with \ *Silverlight * built apps running on a \ *Windows 10 Mobile * device that has a \ *virtual/onscreen navigation bar *.  Basically, the operating system returns the wrong information about the pixel resolution of the screen to Silverlight built apps, making it impossible to render to a “DrawingSurfaceBackgroundGrid” at the correct resolution.  The newest daily builds work-around this by detecting this discrepancy in Microsoft’s APIs, and if detected, Corona will refuse to render the “DrawingSurfaceBackgroundGrid” and render to a “DrawingSurface” instead, which will allow Corona to render fullscreen but be unable to render at 60 FPS (it’ll be around 30 FPS).  It’s unfortunate, but we couldn’t find any other reliable solution.

Thanks - but mine looked way worse than that… I also had deployment issues and could not install other apps ( although it did install the app in VS 2015 ).

So i decided to to a complete restore ( not knowing it was gonna go back to win 8.1 update 2 ).

As soon as it did i noticed everything was much bigger and ( icons fonts etc… ).

So this is what i am thinking… in the windows 8.1 phone and windows 10 you can set a setting on the phone to scale the app icons and fonts smaller. I’m going to try this with and without this option set and get back with you ( after all update  are complete )

Larry

ok so i have the latest version of corona windows phone and . VS 2015, Latest version of windows phone 10 ( as of today - fresh wipe and install).

I created a new Corona Cards app I did not change anything in the app. and pushed to my phone ( hello world ).

The hello world is 1/3 the size of my screen. located at the bottom left of the screen.

It sounds like a scaling bug on Microsoft’s end then.  They’ve blogged about it last year (link below), but it sounds like they never fixed it.  And I assume you did these updates via the phone and didn’t use the older insider preview updates which were buggy.

   http://answers.microsoft.com/en-us/insider/forum/insider_wintp-insider_update/lumia-640-users-check-here-for-windows-10/e45ddf8c-5660-44bf-aa16-4a2d23c59883

If this is the case, then I’m afraid there is not much more we can do on our end.  The issue here is that operating system is returning the wrong resolution and scale factor for the device.  If Corona can detect the discrepancy, then we’ll work-around it.  But if we can’t detect it (all of the OS APIs lie about the resolution), then we have no choice but to accept that the OS is telling the truth.

I remember this being the case for the Lumia 535 after updating it to Windows 10 Mobile.  For that device, I posted a C# work-around which identifies that specific device, and if detected, disables background rendering… which unfortunately makes 60 FPS impossible.  I posted this code here…

   https://forums.coronalabs.com/topic/62285-windows-phone-10-black-borders/?p=324087

You could do the same for the Lumia 640XL if you want.  It’s not a great solution, but I’m not sure what else we can do.

And as a quick test, you can set background rendering in C# to false to see if it’ll render fullscreen (no scaling issues).

   fCoronaPanel.BackgroundRenderingEnabled = false;