how to implement Login Register concept in appwrap android

0 votes
I am developing chat application in which i want to register user only first time and next time user will be logged in each time. i am calling ConnectWithUserName api each time when user login. so i am getting user already exsists from appwrap server. so how can i implement register login concept with appwrap android ?  How can i connect user with server permanent ? so that i does not need to connect user every time  

please help me
asked Apr 11, 2017 in Android by bhaveshgoswami6 (10 points)
edited Apr 11, 2017 by bhaveshgoswami6

1 Answer

0 votes
Hi Bhavesh,

AppWarp provides communication channel between two connected users on real time. This requires continuous socket based connectivity between server and client. The basic requirement for this is app need to be in forground otherwise the socket connectivity will be broken. That is reason we need to call connectWithUserName API everytime app opens and player need to start chatting. Generally for chatting, whenever chatting window opens you can call connectWithUserName API.

Coming to the your query, could you please provide following informations:

1. Are you getting Auth_Error which resultCode=1 in onConnectDone callback?

2. Does your user need to login in the app to use the app?

Could you please explain your app flow so that we can suugest how to inetgrate AppWarp in best possible way?

answered Apr 11, 2017 by rajeev.etc (1,579 points)
yes sir i am getting Auth_Error error whenever chatting window opens i can call connectWithUserName API.
yes sir user need to login in the app to use the app
My Chat Application flow is as follow.
1. User Register
3.Select Chat Room
4.Start chatting
5. go to step no 2
Apologies for late reply.
I am assuming you already implemented the app login part. If Yes, once user has logged in to your app, you can use that loggedIn user id to connect to AppWarp every time user opens chat window.

As in my above answer, you need to call connectWithUser API every time you want to start the chat session.

AuthError normally comes if if you are using a userName which is already used on the server by any other user.

Please check this and let me know if you have any queries.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on