Discussion Board

Results 1 to 7 of 7
  1. #1
    Registered User
    Join Date
    Jul 2006
    Posts
    2

    How to get the path to photos on memory card?

    I'm developing a image application and want to keep the file loading part simple with little user interactivity. I don't want a classic filebrowser, just let the user choose a image from a list of thumbnails created from all photos found in the phone and on the memory card (if available).

    I have two swedish phones (6111 and 6280, S40 3rd edition), both uses the same path for the photos on the phone: c:/predefgallery/predefphotos/. Only 6280 has memory stick, path used is e:/Foton/. The path on the memory stick seems to be localized (Foton is swedish for Photos) and I need to know all possible paths on all languganges on all series 40 3rd edition phones.

    Any ideas how to do this? Is there some list of paths used on memory card?

    I assume that:
    "fileconn.dir.photos" only returns the path to photos on the phone (c:/predefgallery/predefphotos/)?
    "fileconn.dir.photos.name" returns a localized path to c:/predefgallery/predefphotos/ and thus can't be used om memory card?
    file:///c:/predefgallery/predefphotos/ is the same on all s40 3rd edition?

    Is this correct?

  2. #2
    Super Contributor
    Join Date
    Mar 2006
    Posts
    516

    Re: How to get the path to photos on memory card?

    Hi,

    to access the memory card You may use
    fileconn.dir.memorycard &
    fileconn.dir.memorycard.name

    Regards,
    Wang

  3. #3
    Registered User
    Join Date
    Jul 2006
    Posts
    2

    Re: How to get the path to photos on memory card?

    Yes, thank you for your reply. The problem is that these strings translates to the root of the memory card and I want the photo directory path directly. A solution would be to parse the subdirectorys of fileconn.dir.memorycard to find *.jpg-files and assume that the dir with the most files are nokias standard directory for saving photos. But since this is J2me I would like to avoid unnecessary file access.

  4. #4
    Registered User
    Join Date
    Jul 2004
    Posts
    1

    Re: How to get the path to photos on memory card?

    The only solution I see is to get "fileconn.dir.photos.name", extract the last path-token (e.g. "Foton") from it and append it to the path returned by "fileconn.dir.memorycard".

    Strange that Nokia didn't provide an equivalent property to e.g. "fileconn.dir.photos" for the memorycard...

    Frank

  5. #5
    Regular Contributor
    Join Date
    Oct 2006
    Posts
    157

    Re: How to get the path to photos on memory card?

    I had the same problem and solved it like this:
    Code:
    String imageStartDir = System.getProperty("fileconn.dir.memorycard");
    String photoDir = System.getProperty("fileconn.dir.photos.name").substring(1);
    imageStartDir += photoDir.substring(photoDir.indexOf('/') + 1);
          
    String videoStartDir = System.getProperty("fileconn.dir.memorycard");
    String videoDir = System.getProperty("fileconn.dir.videos.name").substring(1);
    videoStartDir += videoDir.substring(videoDir.indexOf('/') + 1);
    Does anyone know if this works on all S40 phones or just 3rd edition?

  6. #6
    Registered User
    Join Date
    Aug 2012
    Posts
    11

    Re: How to get the path to photos on memory card?

    Thanks for the reply, but String doesn't work in my program, I have tried adding stdio.h file also, but no luck.

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,793

    Re: How to get the path to photos on memory card?

    Here the programming language is Java.

Similar Threads

  1. Memory Card vs Internal Memory
    By KlaarMobileEntertainment in forum Symbian
    Replies: 7
    Last Post: 2006-07-15, 20:46
  2. Nokia N80 Memory Card gets full - without beeing so?!
    By thunder7553 in forum General Development Questions
    Replies: 0
    Last Post: 2006-07-06, 09:25
  3. Storing my data on memory card on Series 40 phones
    By Sammybar in forum Mobile Java General
    Replies: 1
    Last Post: 2005-12-28, 18:40
  4. Some memory related and other issues
    By sanjg2k1 in forum General Development Questions
    Replies: 0
    Last Post: 2003-07-07, 17:38
  5. can not successfully link any sample using .NET
    By lobotomat in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2002-08-20, 00:29

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×