×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Jan 2006
    Posts
    59

    Question Memory Card vs Internal Memory

    Hi what exactly are the differences for a Symbian application/game when the user installs the program on the memory card instead of the phone memory?

    Customers complain that my game just shows a black screen and nothing more when installed on the memory card, and it works flawlessly when installed on phone memory.


    the only thing I could think of is the fullpath routine I use (to load files).

    To convert a local filename to a Fullpath I put "\\private\\F12345678\\" infront of it, where f12345678 is the UID of my app.

    does this not work when it is installed on the memory card? If not how does one get the fullpath? (this is how the hello world app loads a file)


    and if this is correct, what other differences are there between apps on memory card instead of internal memory?

    thanks!

    Reinier

  2. #2
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: Memory Card vs Internal Memory

    There shouldn't be any. Probably you're failing to specify a path correctly. This is dependent on the api, for instance, some methods (such as CCoeEnv::LoadIconL()) allow "*" to specify the app's resource directory. You also have CompleteWithAppPath() (see AknUtils) and new methods in RFs such as RFs::PrivatePath()
    Again, check the sdk docs to see where each file (reg, resource, etc) is supposed to be stored.

  3. #3
    Regular Contributor
    Join Date
    Jan 2006
    Posts
    59

    Re: Memory Card vs Internal Memory

    Hi,

    just to be sure...

    I'm using the minimum of SDK things since my game is cross platform.

    The only thing I'm using is a basic helloworld app, with key handling, focus handling, and directscreen access using the anti tearing api.

    now direct screen access I've removed and just used an offscreen bitmap, but this didn't have any effect.

    So thats why I thought the fullpath might be the thing....

    So can anyone confirm this:

    if you have a datafile which needs to be loaded (for instance leveldata or a texture or anything) in the PKG file it should be declared like:

    "..\assets\level1.dat" -"!:\private\F1234567\level1.dat"

    and this can be loaded with the path:

    "\\private\\F1234567\\level1.dat" from within the app, no matter if it is installed on the memorycard or internal memory?

    Cheers

    Reinier

  4. #4
    Regular Contributor
    Join Date
    Jan 2006
    Posts
    59

    Re: Memory Card vs Internal Memory

    I tried some stuff, and it seems that the fullpath is not the issue...

    the app is still loading things correctly. So it means something else is different between the memorycard end the internal memory.


    If anyone has a clue what might be the difference I'm all ears... meanwhile I'll investigate further.


    Reinier

  5. #5
    Super Contributor
    Join Date
    Aug 2005
    Location
    india
    Posts
    2,078

    Re: Memory Card vs Internal Memory

    hi,

    use this function to retrive the path of ur application whereever it might be stored MMC or PhoneMemory(it is tested till Fp3) devices....should work for 3rd edition too.


    Code:
    TFileName CMyAppUi::ApplicationDriveAndPath() 
        {
        TFileName appfullname(Application()->AppFullName());
        TParse parse;
    #ifdef EMULATOR   
        
        
    	parse.Set(_L("c:"), &appfullname, NULL);
    #else 
        parse.Set(appfullname, NULL, NULL); 
    #endif
    
        TFileName fn = parse.DriveAndPath();
        
        BaflUtils::EnsurePathExistsL(CCoeEnv::Static()->FsSession(), fn);
        return fn;
        }
    Regards,
    Mateen Maldar
    "Whatever the mind can conceive and believe, the mind can achieve"

  6. #6
    Regular Contributor
    Join Date
    Jan 2006
    Posts
    59

    Thumbs down Re: Memory Card vs Internal Memory

    Hi,

    I've located the problem. And I'm not sure why this should not work.

    Apparently GetDir does not work in your private folder when it is located on the memory card, and it does work when it is in the phone memory.

    so:

    _LIT(KDir,"\\private\\F1234567\\background\\*.dat");

    TInt rc = fileSession.GetDir(KDir,
    KEntryAttMaskSupported,
    ESortByName,
    dirList);

    does not work when I install the app on the expansion card, and it does work when I install it in the phone memory.

    However the path does exist, and it should work. The only thing I can think off is that somehow I don't have priviliges all of a sudden to check this directory which is mine anyway??


    Any help would be appreciated!

    Reinier

  7. #7
    Registered User
    Join Date
    Apr 2005
    Location
    Barcelona
    Posts
    1,678

    Re: Memory Card vs Internal Memory

    As I mentioned before, it depends on the API you're using. In this specific case, as you're using RFs, try either the following: set the session path (see RFs class) to the mmc drive, or define it explicitely in KDir (at least for testing purposes)

  8. #8
    Regular Contributor
    Join Date
    Jan 2006
    Posts
    59

    Re: Memory Card vs Internal Memory

    Hi,

    yes you are right...

    I had to figure out the drive I started from (using the Application()->AppFullName(); as mentioned earlier)... and specify the disk explicitly when using getdir

    thanks for pointing this out

    Reinier

Similar Threads

  1. 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
  2. Storing my data on memory card on Series 40 phones
    By Sammybar in forum Mobile Java General
    Replies: 1
    Last Post: 2005-12-28, 17:40
  3. Replies: 1
    Last Post: 2004-01-13, 23:16
  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
  •  
×