How do I tell AppWarp that my username is X? So someone can warpClient.connectWithUserName(X);

0 votes

I am making for exemple a Pong multiplayer game, but I know that if you want to join to a friend, you must code:

warpClient.connectWithUserName(friendusername);

 

but how do I tell AppClient my username so my friend can warpClient.connectWithUserName(myusername); ?

 

I've tried WarpClient.getInstance().setCustomUserData(X,Y);  (X=username, Y=data which I dont know what is) but it pops an error: unhandled exception: java.lang.exception.

 

 

I am a noobie and I'm starting to code for android... so sorry for my bad skills and my bad english! Thanks in advance

asked Jul 1, 2016 in Work In Progress by Raul Mateo (15 points)

1 Answer

0 votes

Hi Rahul,

Greetings!!!!!!

Yes, If you want to connect with AppWarp you shold use warpClient.connectWithUserName(yourusername) API.

MeanWhile If your friend is also want to connect with AppWarp he should use

warpClient.connectWithUserName(friendUsername) with different client. You can call

getOnlineUsers() API, in Callback you will get all connected users. And you can validate that your friend is connected or not.

Let me know if you have more queries.

Thanks

Vishnu Garg

answered Jul 2, 2016 by Vishnu Garg (674 points)
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 support@shephertz.com
...