Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android how to start activity on Boot-up

Tags:

android

Let me describe you what I want: I want to build a "master app" and set it so that when the phone is powered up, it immediately goes into the master app. The user can never exit this app (this will be used for something like parental control), and he can only launch other apps from within it.

Basically it will be like a "custom desktop".

I must stress out, it is important that this app never exits. As long as the phone is started, this is the only environment that the user has access to.

Now after I explained what I need, I will need your help to tell me what am I looking for. Is this some kind of "default launcher" that I keep hearing about? Or how is this called? How can I do it?

Thanks

like image 876
Bogdan Alexandru Avatar asked Dec 20 '22 03:12

Bogdan Alexandru


1 Answers

Add this into Manifest.

<receiver
            android:name=".Bootupclass"
            android:enabled="true"
            android:permission="android.permission.RECEIVE_BOOT_COMPLETED" >

</receiver>

Bootupclass

public class Bootupclass extends BroadcastReceiver{

    @Override
    public void onReceive(Context context, Intent intent) {
        //write intent here 
    }

}
like image 59
Poovizhirajan N Avatar answered Jan 10 '23 20:01

Poovizhirajan N