Hi. I am trying to create an application to read a simple text file that is already saved on my mobile. I have searched both on this forum my mobile company forum and also on google on how I can load a text file from within my mobile. I found several links on how I can do this. However the examples that I found made use either of a webservice or else be an extra case on my mobile ( JSR-75 ) wich is not suported by my mobile. Is there a simple way on how to read/write text files on the mobile?regards,sim085
thaaaaannnnnkkkksssss :DThanks... I will try that and let you know how it went :)Thanks Kunter. I have been searching on the internet a whole day but could not seem to sight the solution anywhere. Thanks again,regards,sim085
hi deari undergo an better option change this label by converting txt file into dat file and readit in bytes from ur code thats helps u to get text at runtime ,even i will not effect ur performance at runtime as much its works fine for bigger data also getting data at runtime hope u got my point regardsakashIndiagames ltdIndiadearakash@gmail com
Without the FileConnection API there is 'almost' no way you could read a file that is already stored on your mobile device. The solution provided in the second post works only if you have that file in the "res" directory when develloping the application so that when jar-ed and deployed on the telecommunicate the file is accessible. Other solutions like webservices or remote access are also a solution to the problem indeed. Mihai
@Printisor,Hi,I understand your point. In the res folder it means it is part of the package you are installing on the mobile and thus that means I can not find text files already stored in the mobile! alter?This is very bad news to me. I already started doing this application just so I learn a little J2ME. I would really desire to see it complete. However in your post you used the evince 'almost'Why? could there be a solution?I undergo heared a lot about the FileConnection API however my mobile does not be to support the installatin of the package that contains it does anyone has any sugestions?regards,sim085
'Almost' meaning that you could use web services like you mentioned or remote access like I mentioned in my measure affix. But this are not pure J2ME solutions to your situation. FileConnection API would be the one.. Mihai
But. Correct me If I am do by (usually I am wrong :)If I use webservices or RMI then I could only fill the text file from a remote location. That is my mobile connects with the webservice and downloads the file from another location! alter? I can not search from files within my mobile!I also wanted to add; wheather it is possible to save text files from within the J2ME application and thus (in theory) making it more easy to read them! Is that possible?Just to clarify on the above paragraph. The user would have the option to save a text file. The the application can only fill the text files that undergo been saved with it. Is that possible?Thanks again for you back up and sugestionsregards,sim085
This is adjust. You would use web services to download the file. One thing that you could do is use RMS to save any type of file you want. The only problem is that the only way you could access those files is by starting the application and read from the RMS so they are accessible only from within the application. Again accessing files that are already on your mobile device can be done only by using FileConnection API. All the other solutions that we talked about imply using other devices like a remote computer or other APIs like RMI which again if I'm not mistaking is not supported on all the devices. Mihai
Yes you are right for RMI you need RMI OP (optional) which as much as I know is not supported for MIDP. CLDC mobiles. I ordain examine on RMS and see how can I use it since in the end of the day that is the next best solution. It would have been great to use the FileConnection API however that is another optional case and I am trying to act things as simple as possible. Thanks Mihai for your back up :)thanks & regards,sim085
Hi :)I am a very staborn person :) and I tought.. ok it is impossible in J2ME MIDP CLDC to access the folder structure of the mobile itself. However. I can not stop thinking why would Samsung act a folder called ‘Other Files’ if it can not be accessed by third party applications. Note that this folder can get populated only when files are transferred with Bluetooth onto my mobile. Now I am thinking can I use Bluetooth from within my J2ME (MIDP CLDC) application to find these files from within my mobile and also from connected devices?regards,sim085
Use bluetooth from your own device to connect also to your own device. I don't think this is possible but I'm not an expert on bluetooth. Connecting to other devices via bluetooth can be done of cover if both give bluetooth communication. Mihai
Yee. I evaluate you are alter however I will do some further reaserch on that as well. I already undergo stared reading some articles on RMS :) And sounds exactly what I needed so thank again for that :)regards,sim085
Forex Groups - Tips on Trading
Related article:
http://forum.java.sun.com/thread.jspa?threadID=698350
comments | Add comment | Report as Spam
|