Android :: Retrieve Files Or Audio Files Programmatically From Device
May 11, 2010
I want to know how to get the ringtone,audio files in the device and I want set them as alarm. I am working in the code to set the alarm and I want to know how to retreive audio or ringtones from the device.
I've been trying to understand how to get data about all the audio files in the device using MediaAudio but unfortunately the documentation is far from clear. Also, thereīs almost nothing about it on the forum right now and I couldnīt find good resources over the internet.
Iīve seen pretty quick and objective examples on how to access the main information from the containers but I couldnīt find in any place how I could get the names of the tracks (MediaStore.Audio.AudioColumns doesnīt have an specific constant for it) and the most important, how I could retrieve the path for the media (audio file in this case) Iīve found using the info on MusicStore.Audio.
am I missing something here? It seems it should be so easy but I canīt find the info! Also if I change any data on the container, will this data be also changed in the real file as well?
You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to email@example.com To unsubscribe from this group, send email to firstname.lastname@example.org For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
My Samsung galaxy s2's screen reciently got smashed, nothing comes up but I believe the rest of the system works. Now when I connect to my computer it just charges. So I was wondering if there is any way to retrieve my contacts, internet favorites, pictures, and memos without replacing the screen.
My Captivate wont go past the Galaxy S logo screen anymore and the bottom buttons stay lit. I can get it into recovery mode but I would like to save some pics and vids that I have on the internal SD card. Anyway to save files before I Odin flash this thing? Droid explorer sees the phone but wont show the paths/files.
I've recorded audio in my Android application in its AMR format and I'd like to convert these to something that I can more easily use, such as WAV or MP3.
I've found some online instructions for this, for instance: http://www.aquarionics.com/2004/08/04/how_to_convert_amr_files_to_mp3/
which say to start with the 3GPP reference solutions to convert AMR to WAV, and then use sox and lame from there.
I compiled this code and tried to convert my AMR file, but it seg faults. I think this is because Android's AMR files are wrapped in a 3GP container. There is some code online about how to unwrap the AMR files (http://www.benmccann.com/dev-blog/extracting-amr-audio-from-android-3gp-files/), but I can't seem to get it to work and it seems like a lot of extra trouble just to get the audio from these files.
I have multiple audio files in the assets directory of my application. When the user clicks a button I want to play those files in a certain order, one after the other. There shouldn't be any noticeable lag between the audio files. What is the best approach to achieve this? I am thinking of using MediaPlayer objects and OnCompletionListeners. But, that would mean I have to create a lot of OnCompletionListeners because I need to know every time which audio file is next. Am I missing something or is there a better approach?
I've created an application which uses around 15 small audio files. Right now I'm using mp3 files and each is around 200KB. These files are stored in my res/raw directory. I'm using SoundPool class to play the files in my application. I'm hoping to put this application on the android market place. Can one of you suggest what is the best way to store so many audio files? Will my application be scalable? Is wav or ogg format better approach instead of mp3? Please let me know.
I think I should know this, but my mind has gone blank. I'm making an app that has a few hundred small sound files and I want it to play a certain file dependent on a String I pass to the function. Where I hit the brick wall is getting the resId of the sound file.
Some audio files return 0 from MediaPlayer.getDuration(), even though they're perfectly valid files that play ok and that players on Windows can find the duration of. There seem to be two different cases here: certain file types such as .wma and .wav always return 0 duration, and others only do so sometimes. I haven't been able to find any pattern in the latter case, but it does seem consistent per file. The music player displays 0:00 duration for these, so it's not just my code.
I have an audio file in .3gp format on my Android device which I wish to upload to YouTube. I know that YouTube is a video upload site and that I need to convert this sound file to video. I just want an image to display all the time the audio is playing. Google tells me there are number of tools that can help me. But I want to do this via java code from my Android device.
I have a requirement where I need to play an audio file in receiver mode(earpiece).I am not sure whether higher versions of Android SDK supports this receiver mode.I went through some links which said about 1.5/1.6 having changes in these Audio APIs and hence not sure.
Hey, I have a problem with android programing when I try to record and then play the file that was just recored. I can both record and play the sound but the quality stinks. Its not just bad is really hard to listen to and sound abit like its a computer generated voice. I use the andriod SDK-emulator. The code that sets up the recording looks like this;
And the code playing the file later looks like this; MediaPlayer mp = new MediaPlayer(); mp.reset(); mp.setDataSource(path); mp.prepare(); mp.start(); I don't know what part that makes the audio file sound really bad or if its just the emulator that makes it bad and that it would work on a real phone.
I need to record audio and video files in 3gp/mp4 format at the same file and same time.
When i run my application file is created with videofile.3gp but video does not record in sd card on the emulator.please let me clear one thing does video records on the emulator? if i run this code on android supported device do these error clear. Please help me. I am new to this topic.please find the code and errors below.
* @copy Rights * audio.java * sample code for Eminosoft Developerworks Article * Android development Team * www.eminosoft.cm
Ok so I see a lot of people saying they are having problems with video playback when importing from their SD Card but Im having the opposite problem.
I just switched over from the Metro PCS Samsung Code which is a Windows 6 phone to EVO and I put my SD Card in my EVO. All my music files play and the mp4 video files play but the audio from the mp4 video files dont. Does anyone have advice on how to fix this?