Posts Tagged ‘cradle’

[Android] how to include your app into list in dialog which is launched when you put device on cradle or dock

Saturday, December 10th, 2011

I am very in trouble not to find how to solve the problem.
The problem is that I want to include my app into list in dialog.
The dialog is launched when I put device on cradle or dock.

I have searched for a very long time.
And finally I found it!

The hint page is here. I appreciate the author writing it very much.
Custom CAR DOCK application in Android

I have to use intent. And the setting is following.


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

This resolve point is I have to use both category.DESK_DOCK and category.DEFAULT together.
If I use only which one of those, it can’t work.

Here is the screenshot.
DeskDockTest app is my application.
The others are default app of devices.