Questions tagged [bootcompleted]

ACTION_BOOT_COMPLETED is one of the standard actions in Android OS that Intent defines for receiving broadcasts. It is broadcasted once after the system has finished booting.

ACTION_BOOT_COMPLETED is one of the standard actions in Android OS that Intent defines for receiving broadcasts. It is broadcasted once after the system has finished booting. It is usually used to perform some sort of initialization in application (creating alarms is a common usage case). You must hold the RECEIVE_BOOT_COMPLETED permission in order to receive this broadcast. This is a protected intent that can only be sent by the system.

Information is taken from Android Developers site.

157 questions
116
votes
9 answers

Android Starting Service at Boot Time , How to restart service class after device Reboot?

I need to start a service at boot time. I searched a lot. They are talking about Broadcastreceiver. As I am new to android development, I didn't get a clear picture about services on Android. Please provide some source code.
harish
  • 1,755
  • 6
  • 22
  • 36
72
votes
9 answers

How to fix BOOT_COMPLETED not working Android

I know there has been hundreds of this kind of question asked, but I've been checking them all for a while and still couldn't find any solution. I've seen this answer to "Android BOOT_COMPLETED not received when application is closed" said…
yahya
  • 4,810
  • 3
  • 41
  • 58
46
votes
4 answers

Android adb shell am broadcast: Bad component name

I am trying to 'emulate' a reboot (or anything else with the adb shell am) and am unable to figure out how to reference my component. Then again, maybe I don't even understand what is meant by a component. Below I first include a few example…
altendky
  • 4,176
  • 4
  • 29
  • 39
36
votes
9 answers

Android BOOT_COMPLETED not received when application is closed

I am aware that this question has been asked a lot on the site, however, I cant seem to find a solution. My BOOT_COMPLETED receiver is not called when the application is not running. Manifest:
user346443
  • 4,672
  • 15
  • 57
  • 80
29
votes
2 answers

Runtime exception Android O with boot_completed

I'm trying to start an IntentService within my BOOT_COMPLETED receiver, but in Android O (API 26) I get: java.lang.RuntimeException: java.lang.IllegalStateException: Not allowed to start service Intent { act=intent.action.update…
19
votes
4 answers

How to debug BOOT_COMPLETE broadcast receiver's "Force Close" crashes?

Since the phone restarts and thus gets disconnected from the Eclipse debugger/LogCat while it's booting up, how do I see where my boot complete broadcast receiver is crashing? I am performing some actions in the onReceive() of my public class…
Vikas Singh
  • 1,781
  • 7
  • 27
  • 54
14
votes
4 answers

Can't debug through onReceive() in boot completed receiver

Thanks a ton to this site, I have made significant progress with my first Android project. I'm trying to get the execution suspend in the onReceive() method of a boot completed receiver. Below are my manifest and receiver code. Android 2.3.3 API -…
13
votes
3 answers

BroadcastReceiver for BOOT_COMPLETED is too slow

The below is my manifest file.
user8000126
13
votes
2 answers

Android: OnBootReceiver: Exported receiver does not require permission

I've created a BroadcastReceiver, which receives BOOT_COMPLETED. In my AndroidManifest.xml I've added it like so:
Xander
  • 5,487
  • 14
  • 49
  • 77
9
votes
4 answers

Unable to instantiate receiver java.lang.ClassNotFoundException

I got an error in my android application when it tries to instantiate a receiver that i use to start a service on boot up. The error is obvious, it can not find the class file of my receiver. But everything is ok with my manifest file, the packages…
Guilherme Gusman
  • 556
  • 2
  • 7
  • 17
6
votes
0 answers

Android BOOT_COMPLETED Permission Denial

I would like to test my boot receiver (android.intent.action.BOOT_COMPLETED) on a real device running Android 7.1.1 I tried to use this command from the command prompt: adb shell am broadcast -a android.intent.action.BOOT_COMPLETED -p…
Androidian
  • 1,035
  • 1
  • 16
  • 40
6
votes
1 answer

Why GPS based android app is not installing in Assisted-GPS (A-GPS) based android device?

It shows, Error states that "No eligible devices for app install" Device specification is as follows, Model : Lenovo A369i Android OS Ver : 4.2.2 I am doing below permission in android mainfest file
Teekam
  • 939
  • 4
  • 14
  • 26
6
votes
4 answers

AlarmManager inside BroadcastReceiver when BOOT_COMPLETED

I have a Service "GroupsTaskAlarmChecker" that is called every 20 seconds by AlarmManager in onCreate of Groups.class activity this way: int seconds = 20; Intent myIntent = new Intent(Groups.this, GroupsTaskAlarmChecker.class); …
6
votes
1 answer

Android ACTION_SHUTDOWN Broadcast not working

Code - public class ShutdownReceiver extends BroadcastReceiver { private static final String TAG = "ShutdownReceiver"; @Override public void onReceive(final Context context, final Intent intent) { Logger.i(TAG, "Shutting…
Scorpion
  • 6,831
  • 16
  • 75
  • 123
5
votes
2 answers

Intent BOOT_COMPLETED not working on Huawei device

I want to listen to APN Changes in my Android App. Therefore I start a Service on android.intent.action.BOOT_COMPLETED. This Service starts a ContentObserver which listens to changes to content://telephony/carriers/preferapn. I tested this setup on…
1
2 3
10 11