vivek_Android
vivek_Android

Reputation: 1697

Android autostart functionality

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.

Upvotes: 1

Views: 427

Answers (1)

Axarydax
Axarydax

Reputation: 16603

See this related question.

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

Upvotes: 3

Related Questions