Audio Saving Via HTTP In J2ME

Say I am accessing an audio file from a url. How can I download that file and save it into my phone's directory using a J2ME application? Need some advice here
[174 byte] By [darrana] at [2007-11-27 2:56:42]
# 1
If the phone supports JSR-75 you can use the FileConnection API, otherwise, use RMS.All phones support RecordStores, you can use that API, I've saved plenty of audio that way. http://java.sun.com/javame/reference/apis/jsr118/javax/microedition/rms/RecordStore.html
pandora_fooa at 2007-7-12 3:34:40 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
Do you have an example whereby I can reference it from? How exactly can I use RMS to save the audio file?
darrana at 2007-7-12 3:34:40 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3
you can save it using the RMS RecordStore API, read the docs, it explains how you can store a byte[] of an image in the RecordStore. No, I don't have code examples, if you read/understand the API it shouldn't be a problem for you, but you have to write your own code :)
pandora_fooa at 2007-7-12 3:34:40 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4
I want to save an audio file from http and now image. Is that possible with RMS?
darrana at 2007-7-12 3:34:40 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 5
http://developers.sun.com/techtopics/mobility/midp/ttips/imagesinrms/
suparenoa at 2007-7-12 3:34:40 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 6
HiGetting the audio file is doable via httpconnection and in order to save it u need the fileconnection api (jsr 75), its the same concept for the images.Regards,Rawad
Rawna at 2007-7-12 3:34:40 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 7

> Hi

>

> Getting the audio file is doable via httpconnection

> and in order

> to save it u need the fileconnection api (jsr 75),

> its the same

> concept for the images.

it is not an obligation to have jsr 75 to save images on mobile...

RMS can do this

suparenoa at 2007-7-12 3:34:40 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 8

I may not need to use the fileconnection API or RMS for that matter now.

How can I make use of the phone's browser to download the file? For e.g. the user clicks on a selection and it will open the phone's browser and list that file. How can I use the application to launch the browser?

I do know that with a browser you can download files easily. I want to know how I can achieve that?

Thanks

darrana at 2007-7-12 3:34:40 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 9
call platformRequest(String URL) . see the docs for details.Regds,SD
find_suvro@SDNa at 2007-7-12 3:34:40 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 10
Is there a way I can call the browser to save the audio file when I redirect them to an audio instead of manually asking the user to save the audio?
darrana at 2007-7-12 3:34:40 > top of Java-index,Java Mobility Forums,Java ME Technologies...