AlarmManager working well in emulator but not in real device

后端 未结 1 1424
梦毁少年i
梦毁少年i 2021-01-27 07:38

this is my code for setting alarm:

public void SetAlarm(Context context, int tag, long time){
     AlarmManager am=(AlarmManager)context.getSystemService(Context         


        
相关标签:
1条回答
  • 2021-01-27 07:46

    sorry guys, the problem was in PostManager. in PostManager, i was checking a session cookie with another string. so what happen? here is the answwer. before 4 hour the session cookie remain on cookiemanager so the checking by .equal(another_string) work fine. but i think after 4 hours the session cookie expire and .equal(another_string) throw a NullPointerException. so i have just check that the cookie i have get, is null or not. this solve my problem. again sorry guys.

    0 讨论(0)
提交回复
热议问题