Mobile vs Desktop - Recognizing Screen Size

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jhstephenson
Posts: 297
Joined: Wed Apr 22, 2015 11:44 pm

Mobile vs Desktop - Recognizing Screen Size

Post by Jhstephenson »

Has there been any change on how to deal with the difference between the way IOS and Android devices can be displayed?

I still have an issue where when telling a Visual Perspective to be used for Phones, IOS devices work great, but Android devices act like they are a normal desktop.

In defining a content panel I can select whether the panel will be displayed for Phones, Tablets, Medium, or Large Desktops. That would indicate to me that Aware has some kind of function that will return the resolution a device is using. Is there a way for us to have access to that function or information?

Thanks,
Jim
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Mobile vs Desktop - Recognizing Screen Size

Post by Jaymer »

Jim,
I know I've had this issue before.
When you examine the server/tomcat output, right when a user logs in, you can see the screen dimensions/orientation.
If you login with a iPhone and Android, you can see 2 different sets of data - even though both are phones, Aware doesn't pick the same VP for both phones.
In that data you can see there is different data coming from the browser in the phone (User Agent, etc., if I recall correctly).

In short, I think Vlad said the device is the one responsible for sending its config data and Android just doesn't do it correctly (going from memory - this may not be the exact wording to be accurate).

So yes, i've see an Android phone login and NOT load the mobile VP.
I just did something with Bruce a few months ago - maybe he remembers how we tackled this for the Android phone users. Will msg him.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Mobile vs Desktop - Recognizing Screen Size

Post by Jaymer »

Also, since Vlad has functions like IMAGE_WIDTH, IMAGE_HEIGHT,
perhaps he could make a new function for DEVICE_WIDTH & HEIGHT?
Then you could manually change to the VP inside of a initialization process.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Mobile vs Desktop - Recognizing Screen Size

Post by Jaymer »

Here's how I did it at one site where they were going to have lots of android mobile users:
This added a parameter sent to logonOp.aw to force mobile mode.
Screen Shot 2021-12-27 at 10.05.35 PM.png
Screen Shot 2021-12-27 at 10.05.35 PM.png (35.48 KiB) Viewed 3440 times
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Mobile vs Desktop - Recognizing Screen Size

Post by hpl123 »

Take a look here as well: viewtopic.php?t=11678
Henrik (V8 Developer Ed. - Windows)
BLOMASKY
Posts: 1470
Joined: Wed Sep 30, 2015 10:08 pm
Location: Ocala FL

Re: Mobile vs Desktop - Recognizing Screen Size

Post by BLOMASKY »

For my (only) application where I have mobile users, I have 2 VPs which are used for Login. The main one has "Desktop Only" checked and the other has "Phone and Tablets". It works fine with IOS and Android.

Bruce
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Mobile vs Desktop - Recognizing Screen Size

Post by Jaymer »

thx Bruce, thats right... i remember.
you would think to set the VP for just Phones.
the android phone is seen as a tablet, so by grouping Phones & Tablets together, you catch iphone (phone) and android (tablet) to the same VP
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jhstephenson
Posts: 297
Joined: Wed Apr 22, 2015 11:44 pm

Re: Mobile vs Desktop - Recognizing Screen Size

Post by Jhstephenson »

Aware must be determining what the resolution is in order for the Visible on phones (<768px), Visible on tablets (>768px), etc.. options on the Content Panel to work.

So, there must be some kind of function that they are looking at to get what the incoming screen resolution is. It would be nice if we had access to it.

Bruce, my original thought was similar to yours in that I had two VP's, one for Phones and one for everything else. In my case though I want tablets to use the same perspective as desktops. So for the 'Desktop' VP, I had 'Desktop and Tablets' checked. For phones I had 'Phones only' checked. IOS devices work great with that setup. Android always picked the 'Desktop and Tablets' VP.

Both android and IOS work fine when I condition a content panel on Visible on phones (<768).
rocketman
Posts: 1239
Joined: Fri Jan 02, 2009 11:22 pm
Location: Preston UK
Contact:

Re: Mobile vs Desktop - Recognizing Screen Size

Post by rocketman »

I took the cowards way out and got all my android users at first login to click the three buttons and then click “Request Mobile site” from the menu list.

It’s a one time operation because from then on, Chrome remembers and goes directly to the mobile vp for future logins
Rocketman

V8.7 Developer Edition. Server 2016 Standard edition. MySql 5.5
Jhstephenson
Posts: 297
Joined: Wed Apr 22, 2015 11:44 pm

Re: Mobile vs Desktop - Recognizing Screen Size

Post by Jhstephenson »

We have ended up working around it by having two domains that the users can hit...

1. apps.theirname.com - normal desktop access and possibly for tablets as well.
2. mobileapps.theirname.com - uses the mobile login and we can direct things accordingly

Since the users really are restricted to ones that we control this works.
gernotlg
Posts: 80
Joined: Fri Aug 27, 2021 1:24 am

Re: Mobile vs Desktop - Recognizing Screen Size

Post by gernotlg »

Is there not a way for the system to recognise what platform or screen size the person is logging in from, at the Login stage (before they type their username and password)?

I know I can change which HTML (Login.HTML or LogonM.HTML) ... but that seems like something the system should be able to detect by now.

The user or their customer should be able to type the ONE URL and the system should take them to the logon page appropriate for their device.

I've read that you can detect this in your HTML.. with JS or something ... but for some of us.. HTML is already yet another language on top of the 1/2 dozen we already know (plus the RULE Language!!) ... and it's fine to learn enough HTML for formatting some text or something... but AwareIM was supposed to be a Low-Code platform.... yet the very entry point to a system we create seems to require pretty in-depth knowledge of HTML / JS.

Does anyone have such a login page they're willing to share.. ?.. just a basic one that we can change the logo on etc... I'm Happy to pay a fee.

Thanks.
Gernot
V8.8 / Windows / MySQL
Post Reply