Hi gys...
Its me again... yeah, I know...
So.... trying to determining the device type is proving to be not as simple as using the "isPhone, isTablet, isDestop" calls...
Consider this code, that I borowed from @Harris....
Just a bunch of logs, but aren't they usefull!!!
In my desktop, All is GOOD!
BUT in my Samsung S20....
In the first case, both isDesktop and page.getCurrentPageSize agree that this is a Desktop... or a laptop in my case, But the second case, isDesktop still returns true, isPhone returns false, but the page.getCurrentPageSize correctly determines this to be a Phone!
@alwaysbusy once stated about this that....
Its me again... yeah, I know...
So.... trying to determining the device type is proving to be not as simple as using the "isPhone, isTablet, isDestop" calls...
Consider this code, that I borowed from @Harris....
B4X:
LogError("this is a desktop : " & pg.IsDesktop)
LogError("this is a tablet : " & pg.IsTablet)
LogError("this is a phone : " & pg.IsPhone)
Log("So this is a " & pg.GetCurrentPageSize)
In my desktop, All is GOOD!
B4X:
....
this is a desktop : true
this is a tablet : false
this is a phone : false
Waiting for value (101 ms)
So this is a desktop
....
BUT in my Samsung S20....
B4X:
....
this is a desktop : true
this is a tablet : false
this is a phone : false
Waiting for value (101 ms)
So this is a phone
....
In the first case, both isDesktop and page.getCurrentPageSize agree that this is a Desktop... or a laptop in my case, But the second case, isDesktop still returns true, isPhone returns false, but the page.getCurrentPageSize correctly determines this to be a Phone!
@alwaysbusy once stated about this that....
But these finding seem to contradict this.The IsPhone/IsTablet/IsDesktop returns the device type. No matter what the screen size is, this will stay the same as the device doesn't change.