Android Screens support for Liferay 7.4

Jamie Sammons, modified 3 Years ago. New Member Posts: 5 Join Date: 5/13/21 Recent Posts

Hi all,

I tried to configure android screens with Liferay portal 7.4 but I got SecurityException Error and couldn't log in [2].

After some research, I figured Liferay screens does not support Liferay 7.4 yet according to this [1]?

So now I'm wondering is there a workaround to make liferay screens work with the liferay portal 7.4 version? coz I  download liferay portal 7.3 and it worked with liferay-screens just fine.

[1] https://github.com/liferay/liferay-screens/blob/develop/android/library/src/main/java/com/liferay/mobile/screens/context/LiferayPortalVersion.java

[2] The exception I got trying to connect android screens to liferay 7.4

2022-03-29 19:36:44.790 2536-2536/com.liferay.mobile.screens.testapp E/LiferayScreens: Could not login
    com.liferay.mobile.android.exception.AuthenticationException: java.lang.SecurityException
        at com.liferay.mobile.android.http.Response.checkPortalException(Response.java:95)
        at com.liferay.mobile.android.http.Response.getBody(Response.java:49)
        at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:118)
        at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:128)
        at com.liferay.mobile.android.service.SessionImpl.invoke(SessionImpl.java:102)
        at com.liferay.mobile.screens.service.v70.UserService.getUserByEmailAddress(UserService.java:121)
        at com.liferay.mobile.screens.auth.login.connector.UserConnector70.getUserByEmailAddress(UserConnector70.java:23)
        at com.liferay.mobile.screens.auth.login.interactor.LoginBasicInteractor.getUser(LoginBasicInteractor.java:59)
        at com.liferay.mobile.screens.auth.login.interactor.LoginBasicInteractor.execute(LoginBasicInteractor.java:41)
        at com.liferay.mobile.screens.base.interactor.BaseInteractor$1.run(BaseInteractor.java:29)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:920)
2022-03-29 19:36:44.930 2536-2536/com.liferay.mobile.screens.testapp E/LiferayScreens: Error
    com.liferay.mobile.android.exception.AuthenticationException: java.lang.SecurityException
        at com.liferay.mobile.android.http.Response.checkPortalException(Response.java:95)
        at com.liferay.mobile.android.http.Response.getBody(Response.java:49)
        at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:118)
        at com.liferay.mobile.android.http.HttpUtil.post(HttpUtil.java:128)
        at com.liferay.mobile.android.service.SessionImpl.invoke(SessionImpl.java:102)
        at com.liferay.mobile.screens.service.v70.UserService.getUserByEmailAddress(UserService.java:121)
        at com.liferay.mobile.screens.auth.login.connector.UserConnector70.getUserByEmailAddress(UserConnector70.java:23)
        at com.liferay.mobile.screens.auth.login.interactor.LoginBasicInteractor.getUser(LoginBasicInteractor.java:59)
        at com.liferay.mobile.screens.auth.login.interactor.LoginBasicInteractor.execute(LoginBasicInteractor.java:41)
        at com.liferay.mobile.screens.base.interactor.BaseInteractor$1.run(BaseInteractor.java:29)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:920)

thumbnail
Olaf Kock, modified 3 Years ago. Liferay Legend Posts: 6441 Join Date: 9/23/08 Recent Posts

I'd rather recommend to go with any of the established ways to develop an Android UI and utilize Liferay's headless API to get your data.

This will also ensure that you get the largest possible communities on both ends to help you with problems