Is there a way how to start and android application after a boot automatically if it is on the /sdcard
?
Ok, probably by BroadcastReceiver
. But which action is the right one?
ACTION_BOOT_COMPLETED - does not work if it is on the /sdcard (documented)
ACTION_MEDIA_MOUNTED - does not work if it is on the /sdcard (which is undocumented)
ACTION_EXTERNAL_APPLICATIONS_AVAILABLE - does not work, I do not know why
ACTION_USER_PRESENT - does not work if the BroadcastReceiver is registered in AndroidManifest (which is undocumented, but documentation bug has been reported)
Thanks
Jan
Boot Android from the microSD card Power off the device. Insert the microSD card into the microSD card holder (bottom side of the board). Change the boot mode configuration to boot from the microSD card.
Insert the SD card into the device. To launch the process, set the device into Recovery Mode (steps to put into recovery mode depends on the device, check the manual). Use navigation buttons to select install from SD card. Use navigation buttons to select the zip file to launch the process.
try using <receiver android:name=".BootCompleteReceiver" >
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.QUICKBOOT_POWERON" />
</intent-filter>
</receiver>
and this <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
perhaps QUICKBOOT_POWERON help u
Please mention it in manifest file.
</uses-permission>
<receiver android:name=".BootReceiver"
android:enabled="true"
android:exported="true"
android:label="BootReceiver">
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED"></action>
</intent-filter>
</receiver>
provide permission "android.permission.RECEIVE_BOOT_COMPLETED" as child of menifest.
and one more thing your app must not be installed in sdcard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With