Foros de discusión

Sign Up screen show me error in android

GShah Afridi, modificado hace 8 años.

Sign Up screen show me error in android

Junior Member Mensajes: 46 Fecha de incorporación: 21/10/13 Mensajes recientes
HI everyone

I am facing the below issue in android when try to create a user from android. am i missing something?

Could not sign up
java.lang.IllegalArgumentException: Anonymous api user name cannot be empty
at com.liferay.mobile.screens.auth.signup.interactor.SignUpInteractorImpl.validate(SignUpInteractorImpl.java:152)
at com.liferay.mobile.screens.auth.signup.interactor.SignUpInteractorImpl.signUp(SignUpInteractorImpl.java:63)
at com.liferay.mobile.screens.auth.signup.SignUpScreenlet.onUserAction(SignUpScreenlet.java:198)
at com.liferay.mobile.screens.auth.signup.SignUpScreenlet.onUserAction(SignUpScreenlet.java:41)
at com.liferay.mobile.screens.base.BaseScreenlet.performUserAction(BaseScreenlet.java:68)
at com.liferay.mobile.screens.viewsets.defaultviews.auth.signup.SignUpView.onClick(SignUpView.java:137)
at android.view.View.performClick(View.java:5198)
at android.view.View$PerformClick.run(View.java:21147)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)


this is the layout for sign up


<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.example.ghiratshah.testproject.RegisterActivity">

<com.liferay.mobile.screens.auth.signup.SignUpScreenlet
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/signUp">


</com.liferay.mobile.screens.auth.signup.SignUpScreenlet>

</RelativeLayout>

I am using Android Studio 1.3

Also i am using liferay ee 6.2 with tomcat and mysql

please help
thumbnail
Javier Gamarra, modificado hace 8 años.

RE: Sign Up screen show me error in android

Expert Mensajes: 348 Fecha de incorporación: 12/02/15 Mensajes recientes
The SignUpScreenlet needs an anonymous user and password to allow user creation. Both are required attributes, as you can see here.

You can create an user with only those permissions (user creation and assign to a site) and use it as the anonymousUser and password.
GShah Afridi, modificado hace 8 años.

RE: Sign Up screen show me error in android

Junior Member Mensajes: 46 Fecha de incorporación: 21/10/13 Mensajes recientes
Thanks Javier Gamarra for your quick response.

can you tell me how to add these parameters to my layout? the link that you share with me i have already checked but there is no explanation how to add these parameters in your layout.

If you please share a working piece of code with me. May be this help

Once again thanks for your response.
thumbnail
Javier Gamarra, modificado hace 8 años.

RE: Sign Up screen show me error in android

Expert Mensajes: 348 Fecha de incorporación: 12/02/15 Mensajes recientes
Yeah, of course, the code would be similar to this:


<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:liferay="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context="com.example.ghiratshah.testproject.RegisterActivity">

<com.liferay.mobile.screens.auth.signup.SignUpScreenlet
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/signUp"
liferay:anonymousApiPassword="test"
liferay:anonymousApiUserName="test@liferay.com"
>


</com.liferay.mobile.screens.auth.signup.SignUpScreenlet>
</RelativeLayout>


Changes are in bold and you will have to replace test & test@liferay.com with your anonymous user and password.
GShah Afridi, modificado hace 8 años.

RE: Sign Up screen show me error in android

Junior Member Mensajes: 46 Fecha de incorporación: 21/10/13 Mensajes recientes
Thanks a lot Javier Gamarra for your help

This work emoticon

Also can you please tell me once we login from android then how to logout?