Hi, I have an Activity which also has t olisten to a specific broadcast from a self-made service. I have noticed though that when I add that as an action to my Androidmanifest file the app won't actually start whilst debugging. The Activity is also my MAIN activity :
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
But when I add my own extra action to it it simply wont pick up the broadcast and it won't start up out of itself whilst debugging ????
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<action android:name="development.android.service.musicServiceUpdate">
</intent-filter>
Any idea whats wrong here or why my activity wont be catching the broadcast ? Is it possible to have two action's specified to a .MAIN action ?
/edit :
Tried the following :
<activity android:name=".nowPlayingGUI"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:launchMode="singleTask">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:name=".nowPlayingGUI">
<intent-filter>
<action android:name="development.android.service.musicServiceUpdate"></action>
</intent-filter>
</receiver>
That won't work and will throw a :
10-14 11:57:04.412: ERROR/AndroidRuntime(11947): java.lang.RuntimeException: Unable to instantiate receiver development.android.myPlayer.nowPlayingGUI: java.lang.ClassCastException: development.android.myplayer.nowPlayingGUI
10-14 11:57:04.412: ERROR/AndroidRuntime(11947): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2520)