- Forum-Beiträge: 15
21.01.2014, 14:34:49 via Website
21.01.2014 14:34:49 via Website
habe leider ein Problem bei meiner App.
Ich würde gerne ein embedded YouTube-Video aus der App heraus in der YouTube-App starten.
Versucht habe ich es mit folgendem Code:
2 if (url.startsWith("vnd.youtube")){
3 startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
4 return true;
5 }
6}
2 <action android:name="android.intent.action.VIEW"></action>
3 <category android:name="android.intent.category.DEFAULT</category>
4 <category android:name="android.intent.category.BROWSABLE"></category>
5 <data android:host="www.youtube.com" android:scheme="http"></data>
6</intent-filter>
Hat jemand eine Lösung?