How to make the Android device hold a TCP connection to Internet without wake lock?

前端 未结 3 788
孤独总比滥情好
孤独总比滥情好 2020-12-07 23:31

I want my application to be connected to server though the mobile connection, yet allowing the device to go into sleep mode. I expect it to wake up when IP packates arrives.

3条回答
  •  被撕碎了的回忆
    2020-12-08 00:21

    Google Cloud Messaging might be what you are looking for:

    http://developer.android.com/guide/google/gcm/index.html

提交回复
热议问题