I'm developing an app for a BlackBerry which needs to have a minimum framework version: 4.5 I tried installing on a device with a 4.2 framework and gives an error about some rim.whatever.package not found.
So I'm not sure I can add version checking inside the app itself since seems it will not even load.
I know I can detect device version from the website where they get the app itself but was wondering if there's any option to prevent the app from installing if the minimum framework is not present.开发者_开发百科 Or add some better error message on the application itself.
was wondering if there's any option to prevent the app from installing if the minimum framework is not present
Once the app is downloaded from server to device there are no means to prevent installation.
Or add some better error message on the application itself.
OK, Bruce Eckel in his "Thinking in Java" writes:
So the first time an object of type Dog is created, or the first time a static method or static field of class Dog is accessed, the Java interpreter must locate Dog.class.
This means you can do the version check unless the application workflow has reached the point where some absent class should be loaded. So (if RIM class loading implementation doesn't differ from Java SE) this looks like a tricky, but a possible thing.
精彩评论