后台推送心跳包应该怎么做?尝试了2天,最好的成绩是通过
manager.set(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime()+t,
pendingIntent);
正常工作了1个小时,然后就被系统把每分钟一个的延时改成了15分钟一次...
实在是想不出来好办法了...
1
zgxltxz 2015-03-12 09:17:35 +08:00
If your application has strong ordering requirements there are other APIs that you can use to get the necessary behavior; see setWindow(int, long, long, PendingIntent) and setExact(int, long, PendingIntent).
https://developer.android.com/reference/android/app/AlarmManager.html#set(int |