Question

Last year I developed an app on a Xoom running Honeycomb 3.0. When running on that device the following code from the manifest worked.

<intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
            <category android:name="android.intent.category.HOME"/>
            <category android:name="android.intent.category.BROWSER"/>
            <category android:name="android.intent.category.DEFAULT"/> 
</intent-filter>

As you will know this registers my app (specifically, the Activity) to listen for "Home Intents." This worked fine and after the first time I could set my app as the default activity for this action.

Now I have installed the same app onto a Samsung Galaxy Tab running Honeycomb 3.1 and this functionality no longer works, no matter what state the app is in, or how many times it has been opened.

Is this intentional? Is this a Samsung only issue? Most importantly - can I regain the functionality I used to get on the Xoom?

P.S My app is completely legitimate in its intentions and has a perfectly understandable reason to want to replace the Home app.

Was it helpful?

Solution

Get rid of:

        <category android:name="android.intent.category.LAUNCHER" />
        <category android:name="android.intent.category.BROWSER"/>

and see if that helps. Also, try the Home sample app found in your SDK. It uses the following <intent-filter>:

        <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>

OTHER TIPS

My solution was to install, and then uninstall the sample Home app for Android 3.1.

Pressing home now allows a choice between my app and the default Launcher app.

My app remains unchanged.

I had this same problem on an ASUS tablet. I believe the problem was because Launcher was set as the default app for the Home button (i.e., I pressed the home button, got the popup that asks which application I wanted to use, clicked the 'Use by default for this action' checkbox at the bottom of the pop-up, then chose Launcher).

You can fix the problem by going to Settings->Applications, choosing the Launcher, then clicking on the Clear Defaults button.

I gather the reason the sample Home app does the trick is because it clears the defaults itself (how, I don't know, but I know it's not done by setting categories in the intent-filter).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top