02-05-2009 06:25 AM
Currently i am developping an application with many media file (pictures, video and sound). Theses media files are actully in the root folder of the project. Due to this fact my release app is big and everything is store in the application space.
I want to know if it's possible to store media file not in application space. but i want this media file are install during application deployment.
Thank you for your answer and way of search
02-05-2009 06:33 AM
You can store the media files on sd card and ask your App to access these files using Connection.Open(file:///sdcard/....).
But in this case, the files cannot be deployed automatically onto sd card during installation. The user has to manually copy the files in the specified folder.
02-05-2009 07:54 AM
02-06-2009 01:32 AM
I would like to suggest one thing, but iam not sure how far it is achievable. The idea is:
1) Put application and media files together and install your app on to the device. Ofcourse the size of app will be big and the media files will share the app space.
2) When the app runs for the first time, i think we can create an appropriate folder path on sd card and move all your media files to that path. And from that point onwards your app can point to the new path on sd card.
I think this is doable but iam not sure exactly how. You can try working in that direction if you want all files to be installed during app installation.
02-06-2009 04:01 AM
I was thinking about this solution, but finally i am already block with application storage space. And that means if i want reduce my application size to create two application, first one which install media file on sdcard then remove it and install application which use media.
I think it's a good solution neverthless it isn't very usefull for deploy it.
Thank you for you idea on this problem. But i am suprise there is no other way to store ressource for an BlackBerry Application ?
02-06-2009 04:29 AM
02-06-2009 06:16 AM
I see some misunderstanding of how memory works here I think....
OK, first, lets define memory.
128MB RAM - Used for process and running code, whenever you allocate space, etc.
128MB Fast Flash - App Space. This is where Apps have to reside in order to be run.
872MB Fast FLash - Device Memory. This is for persistent storage and internal file system.
8G Slow Flash - External SD Card. This is just a file system.
Now, what you are saying is very interesting, as I am looking to do something similar, but I hadn't gotten to the install part yet, and you have presented an interesting problem that I"m probably going to encounter.
I was thinking I'd have a small app already running that would handle the install from the PC or from the web. This little app would then install whatever I want into SD Card Flash.
Now, there are 2 ways to get data to your device.
In the samples/server code there is a bluetoothdemo and I think this is a bluetooth desktop server. You could, load kind of a mini-app first to your device and start it up.
Then, after that you can connect bluetooth and type in the PC path for the apps to install in your app and it'll load them into your device wherever you want (including SD card). You should be able to do the same thing with USB.
Alternatively as already stated, you should be able to copy files directly to the mounted SD Card via windows explorer. You could provide an app to install and then a .bat file to run while it's still plugged into the USB to install the remainder files on the SD card.
There is only one other way to store stuff and this is to store data as resources. This data can then be accessed as bytes by your app when running and these bytes can be written to files in the sD card. However, the data now exists in 2 places.....not a good design.
I'm unclear as to resources and so forth and if you can download resources that get stored in data memory.
Post on here how you do.