Hi, Thanks for the help!

I have tried the suggestions but still unable to get it to work.  The
"Main" Activity has an intent filter in the manifest but the activity
does not get called. Below is my manifest.  My broadcast receiver is
also listed below. The receiver seems to be working when it is placed
in the dock but the standard CarDock.apk is loaded.  Then if I press
the back key on the phone it shows my activity.  It also gets launched
when it is undocked.

Are the intent-filters setup correctly?

<uses-library android:name="com.google.android.maps" />
        <activity android:name="MyActivity"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.LAUNCHER" /
>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category
android:name="android.intent.category.CAR_DOCK" /
>
            </intent-filter>
        </activity>
         <activity android:name="MyOtherActivity"
                  android:label="Search"
                  android:launchMode="singleTop">
            <intent-filter>
                <action android:name="android.intent.action.SEARCH" />
                <category
android:name="android.intent.category.DEFAULT" />
            </intent-filter>

        </activity>
                <receiver android:name="MyBroadcastReceiver" 
android:enabled="true">
                        <intent-filter>
                                <action 
android:name="android.intent.action.DOCK_EVENT"/>
                                <category  
android:name="android.intent.category.CAR_DOCK" />
                        </intent-filter>
                </receiver>

On Apr 18, 7:54 am, Mark Murphy <[email protected]> wrote:
> shookie10 wrote:
> > Is there any way to disable or override the car dock app?
>
> You should be able to provide an alternative to the car dock app by
> having an activity with an <intent-filter> with the CATEGORY_CAR_DOCK
> category.
>
> I would expect the user to then get a choice of what activity to start
> when they dock their phone, just as there is with a replacement home screen.
>
> However, I don't have a car dock and so have not experimented with this
> category.
>
> > I have created a BroadcastReceiver for my
> > app but the standard car dock app displays, not my app.
>
> To quote the documentation:
>
> "To launch an activity from a dock state change, use CATEGORY_CAR_DOCK
> or CATEGORY_DESK_DOCK instead. "
>
> (that's from the docs for ACTION_DOCK_EVENT, which is what your
> BroadcastReceiver presumably listens for)
>
> --
> Mark Murphy (a Commons 
> Guy)http://commonsware.com|http://twitter.com/commonsguy
>
> Android 2.x Programming Books:http://commonsware.com/books
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to