简体   繁体   中英

How to know if an android device is turned off from the server?

Can I ping the android device from the server to know if it is turned off? I think there is no way to ping the server before the android device turns off. Particularly I will be doing this in node js

Thanks if you can guide me to the right path. Thanks!!

You could maintain a persistent connection using a Faye server. That way, you will get to know when your device switches off. As a fallback, use an sms confirmation, just in case the network is not down.

Node.js example here. https://github.com/faye/faye

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM