I have created app which is also a launcher. This app will load app by default on start up. I would like to give user an option to uncheck not run app on startup.
To load the app on start up I am using Boot receiver in manifest and calling the required java file to load the app.
Now How do I override startup if option is unchecked - instead of loading my app it should load the home screen?
Tried this:
public class BootUpReceiver extends BroadcastReceiver
{
String nostartup= "2";
@Override
public void onReceive(Context context, Intent intent)
{
if (nostartup.equalsIgnoreCase("1"))
{
Intent i = new Intent(context, main.class);
i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(i);
}
else
{
}
}
}
When I restart my tablet I get complete action using prompt gives out other launcher programs with home laucher
How do I go about choosing home launcher?