5

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

stackoverflow
  • 2,320
  • 3
  • 17
  • 21

1 Answers1

2

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

Community
  • 1
  • 1
Shrikant Ballal
  • 7,067
  • 7
  • 41
  • 61
  • 2
    Some helpful links: http://www.livestream.com/platform/developer https://code.google.com/p/m3-stream/ http://sourceforge.net/projects/servestream/ https://code.google.com/p/mizuu-for-phones/ http://stackoverflow.com/questions/10595204/how-to-play-live-streaming-video-in-android – Shrikant Ballal Oct 01 '12 at 11:59
  • Thanks for this code and can you guide me from where i find all channel links to play? –  Oct 01 '12 at 12:14
  • Nop.. i am finding all TV channels URL –  Oct 02 '12 at 06:56
  • The following are the samples of live streaming videos, you can check it for development. http://devimages.apple.com/iphone/samples/bipbopgear1.html http://devimages.apple.com/iphone/samples/bipbopgear2.html http://devimages.apple.com/iphone/samples/bipbopgear3.html http://devimages.apple.com/iphone/samples/bipbopgear4.html http://devimages.apple.com/iphone/samples/bipbopall.html – Shrikant Ballal Oct 02 '12 at 07:47
  • Check if you can play any video as live streaming from above links, if you succeed in it, then you can anytime change the url to your live tv channel url. – Shrikant Ballal Oct 02 '12 at 07:50
  • In all these channels i get sorry this video can not be played. –  Oct 02 '12 at 13:15
  • Super simple solution for a good quick starting point. If some on is beginner like me thank to add is that you can add this code in MainActivity.java file in onCreate and commentout setContentView(R.layout.mediaplayer) if you dont have it. – MindRoasterMir Apr 03 '19 at 15:59