Get Online User while sending push notification

0 votes
HI Team

               I want to know how many users are present in app warp server using below method

UserService userService;

userService.getAllUser();

this method will return all the user present in app warp. but how to check from those user,like who is online from that user list.because i want to send push notifcation to online users.

 

Thanks:-

sarora
asked Jun 16, 2014 in AppWarp by sarora (56 points)

1 Answer

+1 vote
 
Best answer
In appwarp, every user is online. If you are connected with AppWarp, you will be online.
answered Jun 16, 2014 by Suyash Mohan (900 points)
selected Jun 16, 2014 by sarora
How to call getOnlineUser () using app warp..Can you please tell me that ??
If you have successfully connected to AppWarp server, then you can simply call getOnlineUsers() method of Warpclient instance.
http://appwarp.shephertz.com/game-development-center/java-api-reference/#getonlineusers

Just to clarify, what are you exactly using in your app, AppWarp or App42?
I am using App42 Currently,But i want online users ,who are online .and can you please tell me how to use getOnlineUser(). Can you please tell me some kind of demo examples..
App42 works over HTTP REST protocol where you send the request and as soon as response is received connection is closed. It does not have persist connection to check the user or any other status on the server. In your case it can be done using  storage service where you can save user status in a collection. Here you have to explicitly set the status as soon as user comes online and delete/modify it as soon as he logs out. See here for storage tutorial (http://api.shephertz.com/tutorial/Saving-App-Data/?index=storage-data)
Trouble getonlineusers sintaxis
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
...