1

I am working on one application which basically is an auto-start application and runs in background.

The problem is I need to access shared preference before auto start. But if device is not properly booted up how can I access the shared preference?

I want that either if device is completely booted then start my service or I can set any wait to my service to start.

halfer
  • 19,824
  • 17
  • 99
  • 186
vivek_Android
  • 1,697
  • 4
  • 26
  • 43

1 Answers1

3

See this related question.

You should use the permission android.permission.RECEIVE_BOOT_COMPLETED and register a BroadcastReceiver for android.intent.action.BOOT_COMPLETED

Community
  • 1
  • 1
Axarydax
  • 16,353
  • 21
  • 92
  • 151