Playing .pls file not working in android 2.2 [duplicate] - android

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to stream an .pls audio file in android 2.2
Can any body tell how to stream and play an .pls audio file using media player in android 2.2...

As far as I know .pls file contain information about songs or live radio stream. For exmaple when you use shoutcast api it returns .pls file which contain information related to list of radio stations like url of live radio stream, station name etc. Try opening it in notepad to see its format and information it contain. You have to parse url of song or station from it.

First of all read the pls specification. You'll see it's quite straightforward. Just parse the pls file and extract the songs that you want to play.

Related

How to play .pls file in android

Can anyone give me the sample code for parsing and playing .pls file in android?
[playlist]
NumberOfEntries=1
File1=http://stream.radiosai.net:8002/
You need to download the .pls file and read it to find the media file inside since pls is a playlist not a format.
I've been searching for a solution for 2 days about this issue and I've finally found a radio player which you can implement into your code: https://github.com/iammert/RadioPlayerService that plays .pls files from a radio service link (such as: http://stream.radiosai.net:8002/ ).
However, that url on your question should work on the default MediaPlayer but if anyone ever encounters this problem with urls that contain a .pls file, then they should use a radio player that supports the encoding and format.
.

can i direct play .caf file in android? [duplicate]

This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
Can an Android phone decode and play back a *.caf file w/ iLBC codec?
I am developing such type of application ,In my android application play a1.caf file .
I want to know ,is possible to play .caf file in android.
If yes ,then how to play ?
No you can't http://developer.android.com/guide/appendix/media-formats.html state's all the formats used.
You would have to convert to AAC or WAV before you can use it
Android not listed in doc of support media format, means you can't, check out supported media format which android provide.
Android supported media formats

Streaming .m3u file in Android 3.0

I am looking to develop an application where I have to stream .m3u file, this is for ANDROID 3.0 only.
I want to stream this link
dl.dropbox.com/u/2377944/test/abr_test/index.m3u8
it must work in emulator too
I searched a lot, but nothing seems to be working too good.
Please help.
Thanks in advance.
m3u is a play list format, a text file, and not actually audio/video media itself. That means it references media that you would want to stream. The distinction is important.
The contents of the m3u file is important. (Your link is dead, btw.) Show that to use and we can help more. Each of the media files contained in the m3u must be valid and point to media that is compatible with Android.
What makes the media compatable? Check the Android Supported Media Formats page.

Asx stream on Android

I have a requirement of playing a Asx stream through an Android application
I have read the Android documentation, and they don't seem to support Windows Media streams
Is there any workaround possible? Has anyone did that before? If yes, is there some source code available? Or a library that implements this
Thanks
Are you worried about asx file only or any possible outcome after this?
The asx file can be readable as simple string, read the file using byte array and you can get one or many urls that can be
pls file
m3u file
mp3 url
wma url
We don't have to worry about 1,2 and 3. 1 and 2 can have different parsing logics but at the end they will give 3 [mp3 url] and an mp3 url can be easily handled by MediaPlayer api in android . but 4 is also difficult work to be done.

Play music in android [duplicate]

This question already has answers here:
How to play audio files one after the other
(3 answers)
Closed 9 years ago.
I want to play a number of sound files in raw directory one after another in android.
How to do that?
Please anyone provide me an example.
Thanks in advance.
Look into MediaPlayer class documentation. You will all information there.
Want more, get the Android Media Player code
you should try this How to play audio files one after the other the code here will help you to play audio files one after another from assets directory.

Categories

Resources