0

I've created a system that is a web application in which Android devices enrol. It is an EMM system (Enterprise mobility management). I would like to create some sort of heart beat service that calls a web service proving the device is still online and connected to the network. This can then be shown as a green blob on the web application.

I do have a concern.

1) If the system has say 100000 devices enrolled and the heart beat service fires every 5 minutes, would this have an detrimental impact on the server?

i was thinking of creating a BG service that fires the web call and using START_STICKY in case Android kills the service... not sure if that is deprecated now thinking about it.

I could also creat a push notification to restart this service in case the web application has not heard from the device for a while. This is obviously subject to the device not being in Doze.

Does anybody have experience or know best practices for creating a heart beat service or any potential drawbacks i should think about?

i'm not asking for code, more how someone has done it or the best way to do it.

thanks

[EDIT1] I have found the following link. could this be used to contact the server. i understand fcm has a persistent connection.

upstream messaging

turtleboy
  • 8,210
  • 27
  • 100
  • 199
  • *This is obviously subject to the device not been in Doze* - it is not. High priority FCM messages can be processed even if the device is dozing – Tim Feb 08 '18 at 16:06
  • @TimCastelijns I asked question on this last week and placed a bounty on it. It has had over 250 views with no solution. https://stackoverflow.com/questions/48451761/firebase-message-with-high-priority-not-waking-device-from-doze-android-6 – turtleboy Feb 08 '18 at 16:11

0 Answers0