Coordinates on Android device


I have a problem with my Web-App. It works fine on the desktop and the iPhone. But on Android (Samsung) there are some troubles.

I open a web dialog, but it don’t appear on the visible screen. I see the lower left corner of it on the upper right corner of the screen. After rotating the device to the landscape view and back it works.

A litte bit like the problem is getting the x and y coordinates of the pressed portion. Also this works only after rotating the device.

For me it seems that the right coordinates are available after rioting the device, only.

does someone know the problem and has maybe a workaround?

You could get innerWidth and innerHeight in JavaScript

Public Sub getWidthHeight() self.ExecuteJavaScript("window.location.replace('#'+'wh:'+window.innerWidth+'x'+window.innerHeight);") End Sub

Then you get the value in Session.HashTagChanged

For instance:


“wh:” indicates that is the getWidthHeight code that set the hashtag
parse on “:” first, then on x to separate width and height.

If you are familiar with WebSDK, you can use a WebSDK control and TriggerServerEvent to return the values silently instead.


thank you. This works fine.

After reading the value I change the hashtag to a space, to remove the value. But this is not a great thing.