Prevent BlackBerry application from installing on older devices - blackberry

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.

Related

Flash Builder SDK issues

So I needed to install a new SDK to use the Compass ANE that I purchased. Which I did and the issue that I had with it was that the "TabbedViewNavigatorApplication" was not a supported component. So, after some research, the problem was with the new framework file. I took the framework file from the original 4.6.0 (file location shown below):
C:\Program Files\Adobe\Adobe Flash Builder 4.7 (64 Bit)\sdks
and put that in the new SDK file. This fixed this issue but now I have another issue where the old code I had working has now broken.
GeolocationEvent.UPDATE is no longer being called
Camera.setMode() causes a crash
UIComponent.addChild(Video) causes a crash
I am able to run the program with no errors.
Event is not being triggered for Geolocation in Flex
This person had a similar problem to me and he says he fixed his issue but I can't work out what he did:
I worked out the ultimate cause of this specific problem. It stems from Flash Builder not installing the complete Android SDK or the IOS SDK. Once I manually installed these by copying the SDK folders to their correct paths in Adobe Flash Builder, my GPS events were called successfully.
To sum up, if you get this trouble where the code and everything looks alright but it wont call up your events, then check to make sure that your latest SDKs for Flex are installed correctly for Android and or iOS
I haven't done any work with flex SDKs and if anyone can either recommend a place to download one which supports these features or has any advice on how to fix my issue I would be most grateful.
Solved issue. In case anyone looks for this, my old SDK would allow me to run the app from a device without requesting for permission for geolocation event. The new SDk forces you to use the permission status event.
Makes sense to me now. Just wish I had an error pop up asking for permission rather than just doing nothing.

appium fails to launch on iphone simulator

I have the latest version of appium (1.4.0) on a mac. I'm trying to use the element inspector on an app. So, I tried to launch the app through my device but I keep getting an error saying could not initialize ideviceinstaller. So, I tried running it on the simulator. But, the app keeps crashing and i get the log message that DYShaderAnalyzerNextGPU is implemented in two locations. Then, a WebKit threading error and finally that Instruments exited with code 253.
This could be a few things..
First, did you install ideviceinstaller?
if you have homebrew installed, you can install it with brew install ideviceinstaller
Second, the error you're seeing with DYShaderAnalyzerNextGPU can be caused when the DYShaderAnalyzerNextGPU class is a member of multiple targets in a single app. Does your project contain multiple targets? Is this file a member of both? You can still build/run the app relatively safely with this error, but it would be good practice to organize the project such that DYShaderAnalyzerNextGPU only needs to belong to one target.
Third, does your app run successfully in the simulator at all? If you're trying to do special graphics work inside WebKit, it is possible that you need to be running on a real device. Also, you should not attempt to manipulate what thread WebKit is using, I think it typically wants to be the main thread.

Accessing OSX APIs from iOS app running in Simulator for debugging

For debugging purposes I am looking for a way that a iOS app (whose source code I have access to) can communicate with a separate OSX app, e.g. via sockets.
Since an iOS app running in the Simulator runs natively on the Mac, by using specially designed iOS simulator frameworks that route I/O through OSX frameworks, there must be a way that I can achieve that with my own code as well.
Simply adding standard OSX frameworks to the project and using them from within the iOS app does not work:
If I try to load a OSX framework that exists already as a iOS framework, the iOS framework will always be preferred, meaning if a framework function is only available on OSX but not in iOS, I can't get to it. If the framework doesn't exist yet, like Carbon.framework, then I can get the linker tries to load it. For instance, if I'd try to get to SysBeep(), which is part of Carbon.framework, the linker then fails with an error msg when it wants to resolve external symbols that point to other libs that are already loaded as a iOS-only lib.
I've also tried loading a OSX specific framework using dlopen(), but that fails just the same.
In other words:
How can my iOS code get access to the OSX-specific libs additionally?
That's a lot of questions at once. Let's go step by step:
For debugging purposes I am looking for a way that a iOS app (whose
source code I have access to) can communicate with a separate OSX app,
e.g. via sockets.
It's definitely possible to use OS X facilities from within the iOS app process running in the simulator. Using plain sockets would be very simple as the BSD library is identical in both iOS and Mac OS. You can simply compile your C code and it would use the underlying OS transparently.
If you wanted to use an Objective-C API like NSURLConnection you can do this as well. In the simulator your app uses the Mac OS version of Foundation and Core Foundation. In most cases you would not recognize this as the API is very similar.
[...] the linker will have trouble keeping things apart due to name space
collisions [...]
It's not really clear what you are trying yo achieve here. As I explained, the simulator process uses proper Mac OS lower level frameworks directly. It does not make sense to link to higher level frameworks like AppKit since the app does not make use of Cocoa desktop components. That's why there is no NSApplication symbol and the app does not instantiate one. Instead it uses the UIApplication class from the simulator's specially crafted UIKit framework located in
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk/System/Library/Frameworks/UIKit.framework
[...] Building the above then leads to a linker error [...]
That's because the linker is directed to only look into the iPhoneSimulator SDK where no AppKit is present (using a linker flag like -isysroot <path-to-SDK>).
But at this point it's probably worth asking yourself why you want to link to AppKit in the first place. You can set up you interprocess communication without AppKit.
Oh, and to prove that it must be possible somehow, take a look at RubyMotion [...]
In the simulator event handling is done in the "iOS-Simulator.app" process (which is a Mac OS application). To get at these events from within your simulator process you could probably use Quartz Event Services.

error starting xxxx: Module xxxx attempts to access a secure API

I have checked other questions around but no one seems to have exactly the same error. I'm using phonegap+jqm to create an application, initially tested on my android phone, now i'm trying to build-deploy to a blackberry. To build the app i used the phonegap starting guide, with:
ant blackberry load-device
I DID sign the application with the RIM provided keys. Still getting the error. Some help?
The problem was with the Signing Tool + JAVA SDK 1.7: it is a known issue that these two dont get along well.
Download and install the BlackBerry Signature Tool and run your compiled .cod file through it to check whether it is really signed or not.

Application Installation error Blackberry

I have an application of mine on AppStore. But one user is complaining that he can not install the application on his device(Curve 8900) and it's giving error
"Error starting AppName
$28NonTouch$29:
Module 'AppName
$28NonTouch$29-2' has
verification errors."
Now how come it is possible that other's users are able to download properly while one user is getting this error. I downloaded the application from the appstore and its working perfectly.
And when this user tries to install the application through Desktop Manager he is getting error
"No additional applications can
be found. Your file may contain applications that already exist in the
application list, are not compatible for your device, or have errors."
When i tried to stimulate the issue here by installing the application through desktop manager i am able to install it properly without any error messages.
Can anyone suggest me ,what might be causing this issue.?? Is there any kind of version mismatch??
My application is compiled usiong jdk 4.5.
Any help in this regard will be greatly appreciated.
Kindly help,Its urgent..
Thanx in advance."
Probably the problem is related with the version specified in the .alx file.
Check the .alx file and remove the "_blackberryVersion" tag, or change it so it matches the OS version on your device.

Resources