String URL = "file:/" + sFileName;
InputConnection icFile = (InputConnection) Connector.open(URL);
parser = new KXmlParser();
I was hoping you would know if it would be possible to access a file on the local device that is not in the .jar file.
No, you cannot do with standard MIDP. MIDP programs have to portable across many devices. Some devices do not even have a "local filesystem" (Palm OS is an example). So, MIDP does not include an API for local file access.
However, device vendors might have their own API extension for MIDP and they might include this feature. But if use device specific features, your program will be no longer portable.
However, device vendors might have their own API extension for MIDP and they might include this feature.
Do you know whether Nokia & Siemens have thier proprietary API to access their own local file system like what you mentioned ?
Anybody knows the answer ? Pls help.
But accessing copyrighted digital content on the phone is a sensitive issue to device makers. I would not be surprise if the Motorola file I/O prohibits access to installed midi ringtone files ...
But accessing copyrighted digital content on the phone is a sensitive issue to device makers.
Yup, there're always copyright issues. But sometimes I just would like to just concentrate on the technical issues (whether possible to do this/that).
Anyway, not all midi files in the handphone are copyrighted. For example, I can create/compose my own midi composition on the PC and transfer the midi into my mobile via a data cable. And when I do this, the midi file will be in the local file system.
If MIDP/proprietery file IO API allows access to midis outside the jar file, think of the possibilities : the midi that is played could be dynamically changed by just changing the midi file in the file system (which is easy with data cable).
It is just sad that Midlets could not access the local file system. Can I say that handphone makers are narrow minded by focusing only on copyright issues ?
If midies have to be included/packaged into the jar file, then the midi a midlet can play will be sort of "hardcoded"/"fixed".
Originally posted by Timothy Toh:
Most midis downloaded via WAP/GPRS were bought anyway (this means royalty paid). So there should not be any copyright issues.
Well, they were bought for private use. The vendors are not worried about letting you listen to your midi tones with a custom midlet. They're worried about you copying that midi tone to your friend and your friend's friend.
Originally posted by Timothy Toh:
Does this mean that we will never be able to have Mobile WinAmp ??? I mean... since we can't access the local file system. (Let us not talk about piracy and concentrate on technical.)
Well, you *can* access the file system via the PDA optional package on MIDP. It is just not available on many devices because it is "optional" (none of the Nokia devices, for example) and because many low end devices do not have file systems at all. Also, Motorola has proprietary APIs for file system access on some models. In addition, the file I/O is always available on Personal Profile devices.
So, whether you can access the file system on a particular device is at the mercy of the device manufacturer. That is why I advocate openning the native API access on the J2ME platform -- so that any third party vendor can implement the PDA OP for Symbian MIDP phones ...
[ January 20, 2004: Message edited by: Michael Yuan ]