Manage and download files in midlets

Hello everybody, I'm a newbie in J2ME programming so i want to ask some questions related to MIDP:

1) Is possible to download a file from a web server using a j2me app and store it in the phone? i.e: ringtones? I'm trying to create an application for downloading ringtones and images.....

2) If not, could you suggest a workaround for the problem?

Thanks in advance :)

[395 byte] By [KenBa] at [2007-10-2 5:38:01]
# 1

Hi,

Interesting scenario. You will need to FileConnection API (JSR75) for accessing the native filesystem: for creating the physical ringtone or image (png or jpg) files. Furthermore, you need basic MIDP functionality: just open a connection to your server (servlet) and transfer files (as a byte stream) and convert them to actual files.

Search for examples on FileConnection API (JSR75) and J2ME connectivity.

Because you mentioned you're a newbie and this scenario might be more difficult than you would actually expect, you should try each of these techniques in a separate MIDlet to test their quality and usability. Later on, you can decide to merge code into one MIDlet and deploy your actual program.

Good luck!

jappersa at 2007-7-16 1:48:27 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2
most of phone does not support fileconnection API keep in mind that alsojig2nesh@hotmail.com
jigneshkakkada at 2007-7-16 1:48:28 > top of Java-index,Java Mobility Forums,Java ME Technologies...