Join Today
+ Reply to Thread
Results 1 to 2 of 2

Thread: access file..

  1. #1

    Default access file..

    Hi J2ME developers..

    I have try'd a lot accessing a file from my memory card (Motorokr E6) and i have fail'd completely.. can any 1 please help me with this.....

    can any 1 please show me how to read and write to a file in the memory card..


    Code:
     try{
                OutputConnection con =(OutputConnection)Connector.open("file:///SDCard/textFile.txt",Connector.WRITE);
                OutputStream out =con.openOutputStream();
                PrintStream ps = new PrintStream(out);
                ps.println("amithgc");
                ps.close();
                con.close();
            }catch (Exception e){System.out.println(e);
            }
    the above code wont work.. please help.. i have search'd enf.. i didnt get any solution which will work on my linux phone (MotoRokr E6)
    Amith GC
    iLock Developer

  2. #2

    Default

    Connection string should be

    file:///SD/textFile.txt for mmc. <-- this coz very big problem from me. bcoz I read it from developer guide but it doesn't work. so I got answer by asking at developer.motorola.com.

    and file:///phone/ for phone.

    and need to add permissions into JAD file.

    MIDlet-Permissions: javax.microedition.io.Connector.file.read, javax.microedition.io.Connector.file.write
    Visit my Blog here.http://my.opera.com/eakrin


 
+ Reply to Thread

Similar Threads

  1. can't access mmc via file manager
    By anatanimation in forum E6 General Chat
    Replies: 5
    Last Post: 07-13-2009, 10:20 AM
  2. INFO: Way to access ''.system'' file through phone!!
    By laksluvmoto in forum A1200 General Chat
    Replies: 7
    Last Post: 11-03-2008, 09:20 PM
  3. J@ME file access
    By sreenathsreenath in forum A1200 General Chat
    Replies: 1
    Last Post: 04-14-2007, 04:15 PM
  4. [A780] J2ME file access (read and write)
    By eakrin in forum Development
    Replies: 44
    Last Post: 07-01-2006, 05:41 AM
  5. Motorola file access API
    By xml780 in forum Development
    Replies: 0
    Last Post: 01-12-2006, 05:16 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Single Sign On provided by vBSSO

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1