shookie10 wrote:
> 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.

What is the broadcast receiver doing?

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

AFAICT, yes. However, I'm not sure why you have both a broadcast
receiver *and* an activity.

Again, I would have expected, with your activity set up as it is, that
the user would be prompted for which activity to start -- yours or the
built-in one.

BTW, what device and dock are you using for this?

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://twitter.com/commonsguy

Android Training in NYC: 4-6 June 2010: http://guruloft.com

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