Use my own Android app/apk as launcher/Home Screen Replacement
26,042
Solution 1
Setting the correct intent filters in your manifest will allow it be prompt you to use it as a replacement:
<activity android:name="Home"
...
android:launchMode="singleInstance"
android:stateNotNeeded="true">
<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>
See the Intents and Intent Filters documentation from Google.
Solution 2
You can take a look at the home tutorial http://developer.android.com/resources/samples/Home/index.html
Author by
B770
Updated on July 11, 2022Comments
-
B770 almost 2 years
I've created my own app and I want this one to be my launcher. It's a simple app, but it works.
Is it possible to replace the default launcher with my app so that my app always starts by default after booting?
-
Sanket Kachhela almost 11 yearshello Jon and B770, i have successfully implemented lock screen as home screen replacement app. and i also targeting default home screen after unlocking logic by using setComponentEnabledSetting() . but this is working for me till i unlock once. means if i unlock first time than after not getting custom lock screen.. any help? thanks...
-
Jon Adams almost 11 years@SanketKachhela: The question and answer relate to home screen replacements; not lock screen replacements. You should ask a new Question with the code you have now, what you're seeing and need to solve, etc. See stackoverflow.com/faq#howtoask on how to ask a good question.
-
Sanket Kachhela almost 11 yearsyes.. i implemented as home screen replacement and in unlock logic i disabled this home screen by using setComponentEnableSetting() and in meanifeast i have created activity alias to disable and enable action programetically. but after disabling i am getting only default home screen. any help plz... thanks
-
Jon Adams almost 11 years@SanketKachhela: It still sounds like that's another issue. I suggest asking it as a new Question.
-
isaganiesteron almost 10 yearsThis works flawlessy for me, but I then my home button does nothing oustide the lockscreen. Is this just me?
-
Sagar Nayak almost 8 yearshow can i do it programmatically . i am creating a screen lock app. it needs to disable the home button . so i need to set my app as the home screen temporarily .
-
StrikeForceZero over 7 yearsarchive of broken link: web.archive.org/web/20120207002203/http://developer.android.com/…
-
Jon Adams over 7 yearsGoogle pulled this sample code from their documentation
-
Julian over 5 yearsPlease fix link to the archived web.archive.org/web/20120207002203/http://developer.android.com/…