07-16-2008 12:43 PM
Is it possible to install a cod file from a local source? I would like to install a cod/jad or alx file located on //SDCard/ .
Earl
Solved! Go to Solution.
07-16-2008 01:37 PM
Read your cod file into memory as a byte array and then:
byte[] cod = getCodHoweverYouWant();
int newHandle = CodeModuleManager.createNewModule(cod.length, cod, cod.length); if (newHandle == 0) { // Do something informative here
return; } int code = CodeModuleManager.saveNewModule(newHandle, true);
Use "code" to determine if the module was saved correctly (compare it to the CodeModuleManager.CMM_* constants).
07-16-2008 01:43 PM
07-16-2008 02:11 PM
You can also simply place your JAD file and cod files on the SD card. Then simply point your browser at the JAD file on the SD card and it will install just like it does for a normal OTA installation.
For example, the link for the browser would be file://Media Card/BlackBerry/Applications/MyApplication.jad
Note that there is a current issue that the browser will not install the application if the radio for the device is "off" prompting the user to turn on the radio to access this resource even though it is local to the device.
07-16-2008 02:13 PM
Note that this will work but the application won't show up in the Application screen (Options->Advanced->Applications) unless you also use the CodeModuleGroup class to indicate to the VM that the modules together comprise an application.
03-12-2009 12:09 PM
I'm trying to install my application and tried copying the single COD and uncompressed COD files w/ JAD file. In both scenerios I download the application but then get a 907 Invalid COD, Unable to import ZIP file. This is with the BlackBerry Storm. Any suggestions?
03-17-2009 02:58 PM
Please see the following link.
Support - 907 Invalid Jar Error when installing an application wirelessly
Article Number: DB-00432
4 weeks ago