>> However when I uncomment that trace statement and examine the values of sw and sh they are 0 as shown attached.
correct, they are set by;
sw = self.GSV('_screenWidth_')
sh = self.GSV('_screenHeight_')
which means they are 0 until set - which means in your log they have not been set yet.
>> but that only works for second and subsequent screens
yes, because when requesting the first page, the browser does not send through the screen size. In the reply to the first page is a note to the browser to report the screen size, which it then does (you'll see it in the log) and so subsequent requests will take that into account.
>> I would really like to force an Android running on a table into full screen mode
ok, then use the User-Agent to make a determination of whether it is mobile or not. ie add code to the SetMobileBasedOnAgent method. the UserAgent (property p_web._UserAgent) is all you have on the first request to base your decision on.
cheers
Bruce