2

I'm trying to read the database once my app receives boot_completed broadcast.but im getting NullPointerException when trying to open the database. My objective is to store reboot count and that should be persistent (should survive reboot).Is this possible?If not possible is there any other way around to achieve the same.please help!..thanks..

Jey
  • 93
  • 1
  • 8
  • Which statement in your code generates the NPE? – CL. Dec 18 '12 at 10:28
  • I'm also having this issue. Maybe the application is trying to access the SQLite before it is prepared for use? One way to do this is to put a thread.sleep or scheduling an Alarm to repeat the process... – Miguel Ribeiro Jan 07 '13 at 14:40
  • m also getting same error :( in phone boot completed receiver. – JAPS Oct 21 '13 at 12:59
  • This is the Code written `public void onReceive(Context context, Intent arg1) { Toast.makeText(context, "received ", Toast.LENGTH_LONG).show(); AlarmScheduleUtil.setAlarmForMidNight();` – JAPS Oct 21 '13 at 13:00

0 Answers0