BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-24-2007, 09:39 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2007
Model: Curve
PIN: N/A
Carrier: non
Posts: 22
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default How to programmatically download *.jad and set up it into device?

Please Login to Remove!

Hello!

How to programmatically download some application (*.jad or *.cod) and set up it into device?
How to programmatically update my application through web?

Thank, Eugeny
Offline  
Old 09-25-2007, 02:59 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

- open a browser instance with the address of your file as parameter.

- one possibility is to download the jad-file to your device and parse it for the version information. compare this with your installed version.
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 09-25-2007, 07:51 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Aug 2005
Model: 8830
Carrier: Verizon
Posts: 144
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Unfortunately, the most you can automate is launching the browser pointed at your jad file, but the user will still be prompted to begin the download or cancel. Because of the security of the BB, applications are not allowed to be downloaded without the user's knowledge.

You can post a simple XML file with your application's current version info and your app can automatically check this file to determine if there is an update available, but that's as far as you'll be able to take it.

I use an XML file that has the current version, date the version was made available, urgency of the upgrade (ie, normal, critical, immediate), and the url where the upgrade can be downloaded from. The urgency allows me to determine if the user is allowed to continue running the old version, or how long before they must do the upgrade.

I currently have approx. 1100 users scattered across the US, and this has worked great when I need to update my app.

fbrimm
Offline  
Old 10-14-2007, 11:53 PM   #4 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2007
Model: Curve
PIN: N/A
Carrier: non
Posts: 22
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

fbrimm!

Can I install my application without using the browser and the browser field?
__________________
Thanks, Eugeny
Offline  
Old 10-15-2007, 07:52 AM   #5 (permalink)
Thumbs Must Hurt
 
Join Date: Aug 2005
Model: 8830
Carrier: Verizon
Posts: 144
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

dj0n,

You have 2 options for loading an app on the BB. Either you or the user uses the browser to link to the jad file, or you can push the app down from the BES. Pushing the app from the BES is the only option that can install the app automatically (the user may still be prompted to restart/reboot if the app is running).

Like I said previously, the most your app can do is recognize that there is a new version available and stop running if it is critical that the user upgrade to the new version.

fbrimm
Offline  
Old 10-15-2007, 10:36 PM   #6 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2007
Model: Curve
PIN: N/A
Carrier: non
Posts: 22
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

fbrimm,

Can I use MIDlet.platformRequest(String URL) for this purpose?
__________________
Thanks, Eugeny
Offline  
Old 10-16-2007, 08:16 AM   #7 (permalink)
Thumbs Must Hurt
 
Join Date: Aug 2005
Model: 8830
Carrier: Verizon
Posts: 144
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am not a MIDlet programmer, so I can't answer your question. I did some quick searching on the internet and from what little I could find you are still going to receive the prompts before the download can begin (you may also receive an additional prompt that the application is attempting to launch the browser).

RIM goes out of their way to make sure their device/OS remains secure under all circumstances. If applications were allowed to update or install automatically without the user being involved, it could potentially allow for unwanted software to be installed and running.

fbrimm
Offline  
Old 12-08-2007, 01:50 AM   #8 (permalink)
Talking BlackBerry Encyclopedia
 
richard.puckett's Avatar
 
Join Date: Oct 2007
Location: Seattle, WA
Model: 9020
PIN: N/A
Carrier: T-Mobile
Posts: 212
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

If you want to *install* an app you'll need to use a browser, as has been said; if you want to *upgrade* an application (or install additional applications via your previously installed app) you can use CodeModuleManager. Just download your cod files with normal networking, then createNewModule() and saveNewModule().

One thing I've found is that if you upgrade an app (CLDC app) the new version of the app runs right away. If you upgrade a library you need to reset the device before the changes are picked up (even though isResetRequired() returns false). I guess if saveNewModule returns CMM_OK_MODULE_OVERWRITTEN you know it was a lib and will have to reset (overwriting an app returns CMM_OK).
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.