Just spent a couple of hours last night developing a pretty sweet video player for Honeycomb, and now I'd of course love for people to be able to use it.
How can I make my application listen for / receive "video play broadcasts"?
I'm guessing it's got something to do with the manifest.xml
file, but I was unable to find anything about it on the Android Developer site.
I've tried using the following without much success:
<receiver android:name=".VideoPlayer">
<intent-filter>
<action android:name="android.intent.action.VIEW">
<data android:mimeType="video/*" />
</action>
</intent-filter>
</receiver>
I eventually solved this one myself with the following code in my manifest.xml
file:
<!-- Video player -->
<activity android:name=".VideoPlayer" android:label="@string/app_name"
android:theme="@style/BlackHolo" android:screenOrientation="sensorLandscape">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="rtsp" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="video/*" />
<data android:mimeType="application/sdp" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" />
<data android:mimeType="video/*" />
</intent-filter>
</activity>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With