开发者

MIDlet + BlackBerry API = verification error?

Is there any way to write a MIDlet, but still use BlackBerry API classes and functions (including the APIs that require code signing)?

In particular, I'm trying to use Kuix (http://www.kalmeo.org/projects/kuix). A pure MIDlet + Kuix (so without BlackBerry stuff) works perfectly after I converted the jar/jad to a cod file.

As soon as I add BlackBerry API-stuff (CoverageInfo.COVERAGE_DIRECT in this case) I get a verification error when trying to run the cod开发者_开发技巧 file:

Error starting $name: Module $name has verification error 2410 at offset 9a4f

What can I do to solve this?


I guess you have to convert jar into cod (as you did) and maybe sign it.

BB Developer Tutorial C40 Using MIDLets on BlackBerry :

Without a doubt, additional RIM APIs give developers much more flexibility and the ability to provide customized functionality for their BlackBerry applications. Existing MIDLets can be used as is on BlackBerry Smartphones or they can be enriched by adding BlackBerry specific features.
On the other hand applications customized for BlackBerry will not work on other platforms, and if portability is of major concern, RIM APIs should not be used, or you can opt to have two builds: one for BlackBerry and one for all other J2ME devices. Even if portability is a concern, you can see how easy it is to add some BlackBerry specific features, and I highly recommend doing so.
At the end of the day there are three options you can choose:
1. Run an existing J2ME (JAR file) application on BlackBerry
- a. No cost
- b. Problems with permissions and not optimized user experience
2. Convert the JAR file into COD and sign the application
- a. Virtually no cost – Code Signing Keys cost about 20USD
- b. No issues with application permissions, but still problems with non-optimized user experience
3. Converted and Signed OPTIMIZED application
- a. Very short development time – Usually couple of days
- b. Much better overall user experience.

See also A60 How And When To Sign


Here is the full documention from RIM on Midlet

In Midlet application some of the BlackBerry API is not availlable, you will need to build a CLDC application to use them.


I agree with Max, the only point I would add here is that all blackberry API's except the one related to UI can be used in a Midlet. The LCDUI and Blackberry Native UI cannot be used together in an application.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜