If you are using Internet Explorer, please remove blackberry.com from your compatibility view settings.

Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
New Developer
dupuyyann
Posts: 11
Registered: ‎01-21-2009
My Device: Not Specified

Media Storage for bb application

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

Please use plain text.
New Developer
mnkumar
Posts: 71
Registered: ‎12-26-2008
My Device: Not Specified

Re: Media Storage for bb application

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.

Please use plain text.
New Developer
dupuyyann
Posts: 11
Registered: ‎01-21-2009
My Device: Not Specified

Re: Media Storage for bb application

Okay, but there is no way to store this file in sd storage or mobile memory not attribute for application and install it during the application deployment. Because it's what i research automate everything during deployment
Please use plain text.
New Developer
mnkumar
Posts: 71
Registered: ‎12-26-2008
My Device: Not Specified

Re: Media Storage for bb application

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.

Please use plain text.
New Developer
dupuyyann
Posts: 11
Registered: ‎01-21-2009
My Device: Not Specified

Re: Media Storage for bb application

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 ?

Please use plain text.
Developer
BBDeveloper
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: Media Storage for bb application

What is the approximate size of media data you want to ship along with application? You can opt for downloading and placing all the required media files from network when you connect for the first time. Next time onwards you will be having your files in local SD card.

Use Search. "Accept Solution" If the problem is resolved.
Please use plain text.
New Developer
dupuyyann
Posts: 11
Registered: ‎01-21-2009
My Device: Not Specified

Re: Media Storage for bb application

I Think i will follow this way, currently i have around 5Mb media file, but then that can up to 10-20Mb.

 

Thnak you

Please use plain text.
Developer
webmasterpdx
Posts: 558
Registered: ‎11-25-2008
My Device: Not Specified

Re: Media Storage for bb application

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.

 

Good luck.

Post on here how you do.

 

Thx

-Donald

Please use plain text.