qtblackberryblackberry-10cascadeblackberry-cascades

how to create a read/write folder under asset?


I'm developing a BlackBerry 10 mobile application using the Momentics IDE 2.1.2 (native SDK).

I created a folder that I named "server" under "assets/images/" folder where I will save the downladed images from server.

For a reason I don't know, when I run my app. using the IDE it works perfectly but when I use the release app (.bar) and install it manually, it doesn't work because the assets forlder is in read-only mode according to this link.

I don't get it !! normally the forlder "server" should be in read/write mode and I need it to be under assets folder because I will use these images and set them in ImageViews using the relative path ("assets:///").

Can any one help me ?


Solution

  • Like Frank said, assests are read only. Use data folder.

    For some reason assets may be read-write in a debug mode, but never as a release.

    Edit: access data from c++:

    QString path = QString(QDir::homePath() + "/images");
    

    which will go to /data/images