Check device resolution
Check device resolution
How can I check the device resolution on android with Spiderbasic? I tried a small program using ExamineDesktop but this seems to give an incorrect answer. I would like to be able to make an app that adapts to different screen resolutions. Thanks.
Re: Check device resolution
Android: Test resolution screen: viewtopic.php?f=13&t=1288
Re: Check device resolution
Thanks for the link. Was able to take some of the code.
Minimal example that worked OK
Minimal example that worked OK
Code: Select all
CloseDebugOutput()
Global width, height
!v_width = screen.width * window.devicePixelRatio;
!v_height = screen.height * window.devicePixelRatio;
result =MessageRequester("Resolution: "+Str(width)+" x "+Str(height),#PB_MessageRequester_Ok)
If result
End
EndIf