简体   繁体   中英

live streaming TV channels in android

Hello i am new android developer. And I don't know about Live Streaming Hindi TV channels. I find on net but not get perfect idea.

Can anybody give me idea about how android works with live Streaming channels.

THanks in advance. Dimple

You can use VideoView for this. Try following:

String LINK = "type_here_the_link";
setContentView(R.layout.mediaplayer);
VideoView videoView = (VideoView) findViewById(R.id.video);
MediaController mc = new MediaController(this);
mc.setAnchorView(videoView);
mc.setMediaPlayer(videoView);
Uri video = Uri.parse(LINK);
videoView.setMediaController(mc);
videoView.setVideoURI(video);
videoView.start();

For more info, please see this: how to play video from url

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM