How to set default app launcher programmatically?

This is actually possible with a little workaround: Create an empty Activity that acts as a launcher called FakeLauncherActivity. Add it to your manifest as a disabled component: <activity android:name=”com.path.to.your.FakeLauncherActivity” android:enabled=”false”> <intent-filter> <action android:name=”android.intent.action.MAIN” /> <category android:name=”android.intent.category.HOME” /> <category android:name=”android.intent.category.DEFAULT” /> </intent-filter> </activity> Check whether your desired launcher activity is the default one (with the … Read more

How to make a launcher

Just develop a normal app and then add a couple of lines to the app’s manifest file. First you need to add the following attribute to your activity: android:launchMode=”singleTask” Then add two categories to the intent filter : <category android:name=”android.intent.category.DEFAULT” /> <category android:name=”android.intent.category.HOME” /> The result could look something like this: <?xml version=”1.0″ encoding=”utf-8″?> <manifest … Read more

How to start/ launch application at boot time Android

These lines of code may be helpful for you… Step 1: Set the permission in AndroidManifest.xml <uses-permission android:name=”android.permission.RECEIVE_BOOT_COMPLETED” /> Step 2: Add this intent filter in receiver <receiver android:name=”.BootReceiver”> <intent-filter > <action android:name=”android.intent.action.BOOT_COMPLETED”/> </intent-filter> </receiver> Step 3: Now you can start your application’s first activity from onReceive method of Receiver class public class BootReceiver extends … Read more

How can I create a custom home-screen replacement application for Android?

Writing your own home screen application is possible. It is called the Launcher. You can get the source code of the default Android Launcher via Git. The project URL is: https://android.googlesource.com/platform/packages/apps/Launcher2.git You can get the source code like this: git clone https://android.googlesource.com/platform/packages/apps/Launcher2.git That will create a directory called Launcher2 for you. Now you can get … Read more

How to set different label for launcher rather than activity title?

Apparently <intent-filter> can have a label attribute. If it’s absent the label is inherited from the parent component (either Activity or Application). So using this, you can set a label for the launcher icon, while still having the Activity with it’s own title. Note that, while this works on emulators, it might not work on … Read more