So I am creating a podcasting app and I was wondering if playing a podcast such as this http://www.npr.org/rss/podcast.php?id=122287224 - will MediaPlayer work to play such a podcast? I have never used MediaPlayer and I am just wondering if that would work.
yea you can , just parsing the xml and get the link of the xml and using the media player in streaming the mp3
this tutorial help you
here how to parse xml
http://www.androidhive.info/2011/11/android-xml-parsing-tutorial/
media player and streaming
http://www.helloandroid.com/tutorials/musicdroid-audio-player-part-i
http://blog.pocketjourney.com/2008/04/04/tutorial-custom-media-streaming-for-androids-mediaplayer/
http://blog.endpoint.com/2011/03/api-gaps-android-mediaplayer-example.html
http://androidstreamingtut.blogspot.com/2012/08/custom-progressive-audio-streaming-with.html
Related
I'am using Android Media Player to play music from my server. It is possible to save playing audio to storage using MediaPlayer?
MediaPlayer class does not support downloading an audio, you will need to download it using http, as far as I remember there DownloadService in Android that you can use to download. You can also try to use any library, please Check this link
I understand that the Android MediaPlayer cannot handle .pls files, but I am trying to create a streaming radio app and the .pls URL is all I have access to. Is there any way to make this work, or am I out of luck?
Just read the .pls files and get all the URLs there. And thats what you have to use since .pls is just a playlist. Once you have all the URLS, you can already use mediaplayer.
I want to get YouTube Videos in Android VideoView for my application.
I am going through the Google's YouTube API. I have generated the Client ID,Client Secret,redirect-URL and code by the help of this API Documentation.
https://developers.google.com/youtube/2.0/developers_guide_protocol#OAuth2_Installed_Applications_Flow
Next step is to get Access Token for Installed Applications, I am doing the same as the above Doc is explaining but getting this error.
java.io.FileNotFoundException: https://accounts.google.com/o/oauth2/token?code=4/sfsekiMy-EWE_7der69fy3wsdfdsseclient_id=412600012302.apps.googleusercontent.com&client_secret=0P7H4yqRZY2jmpluiyswqnbz&redirect_uri=http://localhost/oauth2callback&grant_type=authorization_code
Any help is highly appreciated OR you can suggest some way to access YouTube video in my Android App using only MediaPlayer and VideoView.
Thanks in advance.
Try this thread How to play YouTube video in my Android application?
Steps:
a. Create a new Activity, for your player(fullscreen) screen with menu options. Run the mediaplayer and UI in different threads.
b. For playing media - In general to play audio/video there is mediaplayer api in android. FILE_PATH is the path of file - may be url(youtube) stream or local file path
MediaPlayer mp = new MediaPlayer();
mp.setDataSource(FILE_PATH);
mp.prepare();
mp.start();
Please provide some url related to some documentation about video streaming in android. I got many document on this site but all are getting total content of video from url and then playing the video but i want to stream and play video simultaneously so that i can play without consuming a lot of time. thank you
There are two techniques:
Using MediaPlayer: If you are using streaming server to fetch video then just provide your URL in MediaPlayer source. MediaPlayer will manage everything.
Manually: If you are not using streaming server for video then you need to download and play video. Use following link as example. In following link author explain audio streaming. You can use same technique for video.
http://blog.pocketjourney.com/2008/04/04/tutorial-custom-media-streaming-for-androids-mediaplayer/
I'm trying to create a simple video player with 3 buttons: play, stop and pause. My video will be from the raw folder or at a server url that I will upload it to. Do you have any tutorial on this in order to get some ideas? Also, I have created a media player with a song, but I think that this can't work for videos, right?
There's a project sample in the SDK for the VideoView. You can attach a MediaController to it, which will show you play/pause stop and skip buttons. It's also on the developer website, here.
this may be what you are looking for: http://davanum.wordpress.com/2009/12/04/android-%E2%80%93-videomusic-player-sample-take-2/
To make this more abstract, the VideoView Widget is what you need.