Testing 6.3RC1 Agent for screen

How does the Agent features work.
I tried to create a simple app with logjn for Phone.
Then I run the application on Chrome on Android. The login screen behaviour was just as on a regular screen.
Do I have to specity what type of device am running?
I also discovered that if I create a new main screen the application hang on loading main page after login.

Hi,

Agent enables you to specify target device for a specific version of a regular screen. For example, if you have a screen “demo$Order.browse” with a huge table with many columns for Desktop and you need to add a small version of this screen with fewer data you can create a new screen with the same id and specified agent PHONE or TABLET.

Also, you can create your own ScreenAgent selectors, if you create a class that will implement ScreenAgent interface and will be a Spring bean. For instance you can see implementation of com.haulmont.cuba.web.agent.PhoneScreenAgent, that uses screen aspect ratio and maximum screen dimension to detect phones.

If you want to create a specific login screen for phones you need to create a new screen with loginWindow and set agent option to PHONE, so if a user opens your application on a mobile phone CUBA will automatically select this version of the screen instead of the default.

For now, CUBA screens (login/main/users/etc) does not have specific versions for mobile devices and we are not planning to add it in the near future.

And about your main screen, could you share a simple project with that hanging extended main window? Could you give us more details about this problem?

Correct. But how do CUBA identify the agent or Phone. I have tried with Android.
The screen was not changed according to Phone configuration.

What device have you tried?
Could you attach a sample project in which you have tried to show special version of screen for your phone?

I have tried with Samsung Galaxy 5S SM-G900F
Android 6.0.1.
Google Crome for Android version 52
I will attach the project a little bit later. I am not on my laptop right now.

I’ve checked Galaxy S5 with Android 6 but I couldn’t reproduce the problem.

Please attach a sample project then we will try to find and fix the problem.

Well, I’m not sure how the screen really should look like on the Phone. I think I’ll wait until the documentation is published.