I want to write a program in which user can have something like chat in it. Actually we have a forum in which user can ask questian and if someone answers this question we want to send notification for questioner! Http Request seems good but I think this is not good if we have many users(50K for example) and every 30 sec we send http request to server from online users. I don't want the project to take a long time so I don't want to implement and write socket between android app and server myself. I find GCM but it only works when user have logged in Google account as far as I know. I also saw 'Parse.com' but I don't know if we can use this push notification service as push notification in Parse.com ; As far as I know Parse.com is manual and this is not feasible.
Asked
Active
Viewed 449 times
2 Answers
0
You can use Service
and you can run it in background after define intervals.
For help how to run service forever in background look at this link:Need code example on how to run an Android service forever in the background even when device sleeping, like Whatsapp?

Community
- 1
- 1

Devendra Dagur
- 840
- 1
- 14
- 35
-
I know! I think you don't understand my question because of my bad description! i want library or service like GCM. the main problem is with server! and I want write a MVP so i don't want spent too much time on it. – Siavash Abdoli Sep 09 '15 at 06:55
-
httprequest must write on background too. but this is not good if 5k device every 30 sec ask from server: "what's up?"!!! so i think we need socket and i know we must write it on background. do you know any open source server or client? – Siavash Abdoli Sep 09 '15 at 07:00
0
For android Device some good options are GCM, Amazon SNS , Urban Airship.
Till yet Parse was the best option for me but they are discontinuing their service in 2017, so its not a good option.

Ashish Kapil
- 102
- 8