make your android app boot at device start-up

If you want your app to start-up automatically when Android boots up you need to the following

#1: add the following to your android manifest file

<receiver android:enabled="true" android:name=".BootUpReceiver"
<action android:name="android.intent.action.BOOT_COMPLETED" />
<category android:name="android.intent.category.DEFAULT" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />

view raw
hosted with ❤ by GitHub

This will register for a boot complete receiver event and ask for its permission.

RECOMMENDED READ  yet another seven segment display code generator/calculator

#2 Add a the following java class

public class BootUpReceiver extends BroadcastReceiver{
public void onReceive(Context context, Intent intent) {
Intent i = new Intent(context, MyActivity.class);

view raw
hosted with ❤ by GitHub


Dost Muhammad Shah

Dost Muhammad specializing in Embedded Design, Firmware development, PCB designing , testing and prototyping. He enjoys sharing his experience with others .Get in touch with Dost on Twitter or via Contact form


One thought on “make your android app boot at device start-up

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.