Search code examples
androidandroid-intentdefaultandroid-3.0-honeycombandroid-launcher

Android HoneyComb Registering Home Activity


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.


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>