BOOT_COMPLETED never received

前端 未结 3 768
清歌不尽
清歌不尽 2021-01-15 16:03

Does every device send the BOOT_COMPLETED? I want to start an Activity on Boot Completed.

I put the following in the Manifest:



        
相关标签:
3条回答
  • 2021-01-15 16:33
    1. Add full path and secondly add permission in your receiver.

       <receiver android:name="com.example.BootFinished"
         android:permission="android.permission.RECEIVE_BOOT_COMPLETED">            
          <intent-filter>                
             <action android:name="android.intent.action.BOOT_COMPLETED" />           
          </intent-filter>        
       </receiver>
      
    0 讨论(0)
  • 2021-01-15 16:38

    The possible reasons why broadcast reciever events could fail:

    1. Receiver not declared in AndroidManifest.xml Declare the receiver in the Manifest-file:

    2. Receiver in the Manifest xml is misspelled Android-System is case sensitive. So check your spelling and path is correct in the AndroidMainfest.xml

    3. AVD running for a long time Reset your avd/device

    4.Also if your app is in moved to sdcard.Say you have registered for android.intent.action.BOOT_COMPLETED,the boot event is triggered even before the mediascanner scans the sdcard.

    and all the devices which run android sends BOOT_COMPLETE :P Check again and try :) all the best :)

    0 讨论(0)
  • 2021-01-15 16:47

    As a starting point, try putting the full path of your receiver in the manifest.

    0 讨论(0)
提交回复
热议问题