Start server side coding with appwarps2 sdk

0 votes

Im running on windows machine. I tried using the appwarps2 server.

I downloaded the Chat Server sample code and ran the chat server on my local machine using ANT. 

- Downloaded the Admin Dashboard and ran it on my local machine. 

- Logged in and created App_key

- Used these data to initialize the connection to my local server from android app. It did not work.

Also, I was not able to login using my public IP in admin dashboard
Need some help please.
asked Feb 2, 2017 in AppWarpS2 by Sallu Salman (10 points)
edited Feb 2, 2017 by Sallu Salman

1 Answer

0 votes

Hi Salman,

Greetings from ShepHertz!!!!

If you are running server on local machine, you can use for Admin Dashboard. If you are testing it with the Android App you need to use public IP of your machine and make sure both are on the same network.

Let me know if it helps.



Vishnu Garg


answered Feb 6, 2017 by Vishnu Garg (674 points)
My app is working fine now. Im able to connect to the server only when I give empty AUTHData. What am i suppose to pass in this field?
It depends on your server side logic How you are overriding the User Connectivity on server.You can pass null if you has not overriding the same. Also make sure you are connecting unique user else you will get Auth_Error.
Right now im running the Rummy example server for testing. My app has successfully connected to local server. How can I now edit the code to override the services to satisfy my needs?
Comment code of  handleAddUserRequest in class. Where the server overriding the connectivity call. By commenting this default logic will work.
I want to write custom code for all execution part. We are making a Quiz Up like app. So to fetch questions and to get the results after each question and each game, how and where should i write these codes. Also i wanted to make api calls to fetch/write data into our database.
You can write your custom logic on AppWarpS2 server. You can fetch questions from database and update the same.
Can you please provide some code that sends the questions from database once a user is connected to a room? Right now when app tries to connect handleAddUserRequest function is called. What am I suppose to do from here?
You said to comment code of  handleAddUserRequest in class to override server side user authentication. Like wise to fetch the questions where should  I write the function and which function should be called in android to hit the question fetching function?
On Server you can fetch the same. It depends on your Quiz Architecture. If your question base is same you can fetch the same in a sperate Thread while Zone is created. In its constructor...
If your question base is different in different Rooms than your can  fetch it in handleCreateRoomRequest function in background thread .
Once the sets of questions are there you can save it in a collection.

On Android side you can call Room RPC API to get the question from Server in which you can pass the previous question and send the next from the collection you have save the questions.
I have managed to start the server of quiz up trivia example that you have provide in example page. And also two android phones (max users is 2) are connected to same room. how am i suppose to start the game when 2 users are connected and send questions to the room from server?
Im now running quiz up example code. not rummy server.
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