If you’re willing to do the work in a new activity, the following will work on a device but not on the emulator:
startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.youtube.com/watch?v=cxLG2wtE7TM")));
More Related Contents:
- Why does it take so long for Android’s MediaPlayer to prepare some live streams for playback?
- MediaPlayer error (1, -1004) aka MEDIA_ERROR_IO trying to stream music on Samsung S3
- Android MediaPlayer/VideoView error (1, -2147483648)
- How to play multiple video files simultaneously in one layout side by side in different view in Android
- Playing youtube video in Android app
- How to prevent VideoView/MediaPlayer from stopping other apps’ audio?
- How to get RTSP Links Android
- How to stop youtube video playing in Android webview?
- Get Real Path For Uri Android
- Should have subtitle controller already set Mediaplayer error Android
- vimeo video play in Android native
- Loading Youtube video through iframe in Android webview
- Android Music Seekbar is not working (Idle)
- SeekBar and media player in android
- VideoView to match parent height and keep aspect ratio
- Android – play sound on button click – Null pointer exception
- how to play video from url
- Live-stream video from one android phone to another over WiFi
- How to embed a YouTube clip in a WebView on Android
- javafxports how to call android native Media Player
- Android: How to integrate a decoder to multimedia framework
- Setting data source to an raw ID in MediaPlayer
- Music player control in notification
- Integrating youtube to fragment
- How to play audio continuously while orientation changes in Android?
- Android MediaPlayer.Create() returns null
- Android — Can’t play any videos (mp4/mov/3gp/etc.)?
- Android Multiple YouTube Videos in Activity
- Receive audio via Bluetooth in Android
- MediaPlayer setDataSource failed with status=0x80000000 for Ringtone set by filepath on 2.3.4