Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3322126
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:08:42+00:00 2026-05-17T23:08:42+00:00

for some specific requirement I am required to change Android Default Home application with

  • 0

for some specific requirement
I am required to change Android Default Home application
with my customized Home application ( a setting inside my app that will toggle default home = my application or previous home)

I don’t want the user to travel android settings that are very complicated.

Can any one help me out like where it registers launcher.apk for default
home application or how to change that

The only thing I could find was that old question: How to change default Android's Desktop application?

but no answers at all.

I have seen HomeSwitcher in the Market that do the trick, but no answer for the developer that might certainly be busy.

EDIT

I found this on the web http://www.mail-archive.com/android-developers@googlegroups.com/msg74167.html

But I got the same issue:

this is my code:

    private void makePreferred() {
            PackageManager pm = getPackageManager();
            IntentFilter f = new IntentFilter("android.intent.action.MAIN");
            f.addCategory("android.intent.category.HOME");
            f.addCategory("android.intent.category.DEFAULT");
            ComponentName cn = new ComponentName("com.example.android.home", "com.example.android.home.Home");
            pm.addPreferredActivity(f, IntentFilter.MATCH_CATEGORY_EMPTY, null, cn);

I have the android.permission.SET_PREFERRED_APPLICATIONS set in the
manifest. After executing the code above, the logs claim things have
been added like expected (same logs as when I tick off “Make default”
from IntentResolver’s list). However, when I proceed by clicking home,
the list still shows up and the logs say:

INFO/PackageManager(52): Result set changed, dropping preferred
activity for Intent { act=android.intent.action.MAIN cat=
[android.intent.category.HOME] flg=0x10200000 } type null

So it seems the resolver deletes the default entry. Am I doing
something wrong, or is this a security measure? What are the ideas
behind this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:08:42+00:00Added an answer on May 17, 2026 at 11:08 pm

    I did an extensive research on that and starting from 2.2 there is no way to do that. The only way is using some hacking that toddler lock app does but this app put samsung phones recently in the infinite loop, so it is a risky approach.

    if you look at the froyo source code here of packagemanager class, you will see this small condition in the addPreferredActivity method:

    if (getUidTargetSdkVersionLockedLP(Binder.getCallingUid())
                         < Build.VERSION_CODES.FROYO) {
                     Slog.w(TAG, "Ignoring addPreferredActivity() from uid"
                            + Binder.getCallingUid());
                     return;
                 }
    

    HomeSwitcher does not work properly on 2.2 since it uses this very method and developer made a comment on app page “Froyo(2.2) is not supported
    due to the API change
    “

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What are some platform-specific API's that web browsers use to securely save passwords with
I have an Eclipse RCP app I'm working on. It has some view-specific menus
I'm updating some old AWStats config files to filter out some specific IP ranges.
i'm hoping to find some add-ons for Visual Studio to address some specific usability
How can I have a WinForms program do some specific thing whenever a certain
I was just fooling around with some Domain Specific Language designs for a new
I have a local mercurial repository with some site-specific changes in it. What I
I want to be able to access some device specific data while running an
I've written a Custom User Control which returns some user specific data. To load
How would one go about linking (some) symbols to specific fixed addresses using GNU

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.