I am newbie in the android development.
I am trying to develop an application which needs to play mp3 files in the background.
I read a lot of articles about media browser service and the new architecture approach to develop a media player application.
In my case, the media files will be loaded from a json file, which is depends on the content of the page that the user enters. When the user goes to an activity, the app loads the related information and starts to play the audio files.
If i have understood correctly, the music browser service loads the audio files at the startup and the client can browse the files or controls the playback.
Is that correct?
Can you give me an example how i can load the audio files dynamically in the service?
Related
I am kind of stuck on my app design and wondering, if some of you experts, could point me in the right direction.
I am working an Android App that shows how to pronounce different English words.
When user clicks on a play button next to a word, corresponding audio file (prerecorded wav file) is played with Android media player. I have 2000 words and corresponding wav files (each file is between 1 to 2 seconds).
But the problem is, I can’t pack all 2000 audio files into APP, as it will make APP too big. I am wondering, what is the best way of having the audio files on the server somewhere, and when user clicks play button next to a word, my APP plays from server. Are there any other ways of doing this?
Do I need streaming server for this (it’s not live stream), if so would you please let me know some that host? Can I use Heroku?
Thanks for help
Srini
You do not need a streaming server for that. A simple web pages server will do the job. Just put all your files in (maybe via ftp) to the server in a directory that you now exactly. From there, you can use the MediaPlayer class of android to play those sounds in streaming with the appropriate link to the file.
i've created an Android application that connects to a streaming page. I'd like to know if some data will be stored on my device (like on a temporary folder or similar). This video should be only accessed by the URL so i'd like to prevent any download.
Is there a way to prevent the 'download' of the streaming data on my device? Or if it must be downloaded, can i be sure that no one can use this data if found in a temp file?
Thanks
EDIT
For the web page, i've used this code: http://codesamplez.com/programming/php-html5-video-streaming-tutorial
There is a better way? I was thinking about create an HTML5 video player and use it in my android application as a web view. As i said before, the important thing is to deny any download.
I've a web app which uses HTML5 player to play audio mp3 files hosted on the server. I want to use PhoneGap to convert it to iPhone/Android apps. I want users to cache the audio files on the device. It would be really nice if I can somehow encode it and save it on the device rather than flat mp3 files. Just wondering that how can I do on iPhone/Android using PhoneGap.
I have an app which is using android webview .i am able to stream video in webview .i want know how can i allow users to to save videos automatically in thier internal storage which they stream in webview on website ? Thanks in advance
Most videos streaming to a browser (PC or mobile) will not allow download as the owner of the video may not want to allow it be saved and copied etc.
Simple http progressive download may allow you to save the video in a regular browser by simply right clicking on it.
DRM protected video will generally use a video pipeline (a sort of 'path' through your device) that does not allow an application of any kind access the raw video - this is again is to avoid people making unauthorised copies.
If you think the video in your case is allowed to be copied then you may find it easier to write some functionality to act as the streaming client and save the file locally. You could also pass the received stream along to the media player or to a webview if you wanted to play the file in parallel to saving it.
I would like to leverage (reuse) the built in Android music app to play songs/artists/albums/playlist that their origin is from the web and not from SDcard/internal storage.
To be more accurate, I see that the content is retrieved from MediaStore.Audio.Media.EXTERNAL_CONTENT_URI.
Is there a way to add web audio to the media store?
Basically, why wouldn't it be possible? The mediaPlayer knows how to play remote audio.
Please advise...