BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 08-18-2008, 06:56 AM   #1 (permalink)
New Member
 
Join Date: Aug 2007
Model: 8800
PIN: N/A
Carrier: Vodafone
Posts: 14
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Downloading application by using programmability

Please Login to Remove!

Hi All,
I am developing an BB application in which I am having having my Main Application which will be deployed on user's BB device. And, also, I am having many subApplications which user can download from the Main Application. So, when user runs the Main Application, I need to show the list of subapplications which are available on my web server. So, I can show the list of subapplications to the user with any images for that applications. So, what I want to do, is if user clicks on any subApplication(the image), I want to download that subappliaction from web server to user's device. I am not sure how will I be able to do that, one way might be to download that application through OTA by givng the .jad file link, but I don't want to go by that way. Is there any other way by which I can do this.
So, as soon as user clicks on the image I want to download that subapplication.
Thanks and keenly waiting for your replys....
Offline  
Old 08-18-2008, 07:00 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

you can install applications using the codemodulemanager
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 08-18-2008, 07:19 AM   #3 (permalink)
New Member
 
Join Date: Aug 2007
Model: 8800
PIN: N/A
Carrier: Vodafone
Posts: 14
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi simon,

Thanks for your quick reply.

I seen the API for CodeModuleManager but it clearly mentiones that "Manages the Java code modules installed on the device.".

Can you plz tell me how to use CodeModuleManager to install application from web server.



Thanks,
Offline  
Old 08-18-2008, 01:26 PM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: Apr 2006
Location: Boston
Model: 8900
Carrier: AT&T
Posts: 98
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi!

You can submit a URL to the BlackBerry Browser which will consequently launch and display with that URL. If the URL is the correct URL for downloading a JAD file from your web server, then the BB Browser will commence the download as if the user had entered the URL themselves. This is the easiest and safest way to do what you're suggesting. You can use CodeModuleManager to perform the same operation (after all, the BB Browser has to use the same APIs), but that will be much more programming-intensive: it involves performing a variety of functions, managing downloaded bytes in blocks and creating/appending to a Code module. Look at CodeModuleManager.createNewModule() and CodeModuleManager.writeNewModule(). You will have to set up a connection to your web server, either download the COD module either entirely or in chunks (may depend on the device model/device OS - in earlier device/OS versions there was an upper limit of about 64Kb for the size of memory that could be allocated by applications, but that era may be over), and then create and populate the COD module on the device.

The reason I prefer the BB browser approach is that all of the "programming-intensive" stuff is taken care of for you. I tend to prefer the "let's not re-invent the wheel" scenario.

Good luck,

karl
__________________
Karl G. Kowalski
---------------
Owns a RAZR
Develops for BlackBerry
So next phone will be........an iPhone 3G!

Last edited by holy3daps : 08-18-2008 at 01:30 PM.
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.