6

I did a android application which launch just after boot finishes. It works in android 2.3.3 and Android 3.1 but when i force closed application which runs in android 3.1 and i reboot again the application doesn't come after boot ?

1

2 Answers 2

2

when i force closed application which runs in android 3.1 and i reboot again the application doesn't come after boot ?

Correct. On Android 3.1+, the following types of applications will not run automatically:

  • Applications that are newly installed
  • Applications that the user has "force stopped"

Those applications must first manually be started by the user (e.g., launching one of your activities) before they will receive any broadcast Intents again.

Sign up to request clarification or add additional context in comments.

Comments

2

i do it with this code and it works for me:

public class AutoStarter extends BroadcastReceiver { public void onReceive(Context context, Intent intent) { if("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) { Intent serviceLauncher = new Intent(context, your.class); context.startService(serviceLauncher); } } } 

for testing you can use this in your cmd

adb shell am broadcast -a android.intent.action.BOOT_COMPLETED

1 Comment

thanks Boe.. i also diid the same kind of code but question is different ........

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.