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;


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.



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
Ok..Suppose i have login with one user upon succesful login i am calling getAllUser() , Are you saying in that list i.e. in get all user it will show all online users. ?
With AppWarp, either you are connected to appwarp or not. So, getAllUsers will return all the connected users only. So, you can say, whoever is connected to AppWarp is online and who's not is offline. Therefore getAllUsers will return only online users then
OK.. I have one scenario..suppose i have registered three person i.e. A,B,C on one device and if another user i.e. D who have signed up with another device  and wants to send push notification to All of them .. So my question is to whom it will send push notification.

Looking forward to your reply.

I think there is some confusion.

User Service is part of App42 API.
getAllUsers of User Service returns all the users who have registered through user service ever.

Whereas getAllUsers of AppWarp returns all the users who are connected to appwarp server at that moment. getAllUser method of Appwarp returns all the users who are online or connected to app warp where as getAllUser method of App42API  returns all the users who have registered through user service..Right ??
Yes! This is what I meant :)
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.

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 (
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