Thank you for visiting the BlackBerry Support Community Forums.
- Kevin Michaluk, Founder, CrackBerry.com
08-21-2008 02:29 AM
Hello. Using JDE 4.5, I am thouroughly confused as to how to distribute the application wirelessly over the internet.
I wrote an equivalent of a Hello World app to see how it's done, but having trouble actually installing it.
I dropped .jad and .jar of my application on a web server (as was mentioned in several posts). I pointed the browser to the .jar file and it started downloading. Then it failed, saying "907 Invalid JAR Descriptor missing required attribute MIDlet-1".
I tried rebuilding the app, but the error would not go away.
So my questions are as follows:
1. What files do I need to place on the web server? .jad, .jar, .alx???
2. Which file do I point my users to, e.g. http://www.blah.com/myapp.jad???
3. Another warning that popped up before the error: "This application does not contain a signature. It might not be a from a trusted source....". How do I sign the application and avoid freaking out users with this warning?
08-21-2008 04:36 AM
08-21-2008 10:13 AM
And here is a developer knowledge base article on the trusted source warning.
Support - Warning: This application does not contain a signature. It might not be from a trusted source
Article Number: DB-00556
08-23-2008 03:04 PM
Could I ask a few more questions on this?
So we put our .jad and .cod files in the same folder someplace on our webserver like:
Now for first time install, we just tell users to browse to www.mycompany.com/downloads/mymidlet.jad and the blackberry device will take care of installing the application for us? (cool).
Will the same work as nicely for updates? Say our midlet checks for updates like:
1) Midlet starts up
2) Midlet makes webservice request to our company to see if any updates exist.
3) If update exists, ask user if they want to install updates, if so, just direct them to URL of new update location.
If that's how it goes, how does blackberry handle overwriting the older version? Are we supposed to put our new version somewhere new on our webserver, or just overwrite the original download location with the new version?
And if our midlet depends on other libraries?
Lastly, do .alx files come into play at all via this sort of web update?
08-24-2008 01:21 PM
Yep, drop the jad and cod in a folder (and make the mime changes), send them to myapp.jad, and then the BB magically installs it for you (and uninstalls the previous via a confirmation prompt).
I'm not sure how it will handle the update thing though. A rather ghetto approach might be:
1) Get your application version, and the version that the website has. If different...
2) Pop up a dialog and ask the user if they want the newer version. If user says yes...
3) Send the blackberry browser to mysite.com/myapp.jad
4) They'll get another prompt from BB to confirm the uninstall / install.
Also, depending upon your application, it might need a restart after the uninstall and before the install.
08-26-2008 06:06 PM - edited 08-26-2008 06:33 PM
Ok I tried it and it kind of works, for some reason JDE inserts all these strange .cod URLs in the .jad file like:
I have to delete them all except the last one, then it picks it up ok. Weird.
The bigger question for me now is this line with the dependencies:
I made two external library projects named myLibrary1 and myLibrary2. The phone just quits downloading my main application because I don't have those two libs previously installed. Is there anyway to automate that through the main application .jad file? I probably can't tell users to first download myLibrary1.jad, then myLibrary2.jad, then myapp.jad. Is this what .alx files are for? Can they be used over the web?
08-26-2008 07:39 PM
I think you will find that all these points are explained in the Chapter "Packaging and distributing BlackBerry Java Applications" of the Development Guide.
I've referenced a couple of other places that you might find useful information.
This thread might tell you a little more about the cods with the funny numbers:
You can add your two Library cods to your application jad and download everything at once, the following link explains what you need to change to do so manually (see page 3):