BlackBerry Wi-Fi Location in OS 5 - blackberry

I have successfully acquired Wi-Fi location in my BlackBerry App built on BlackBerry JRE 6.0 through the following code:
BlackBerryCriteria myCriteria = new BlackBerryCriteria(LocationInfo.GEOLOCATION_MODE)
I am now trying to compile the same App in BlackBerry JRE 5.0 However, LocationInfo is not part of BlackBerry 5 API and so I would require another mechanism. I have come to understand that GEOLOCATION_MODE_WLAN is available in BlackBerry 5 only through third party application. For example, Google has a geolocation API that supports wifi location fixes. However I am lost as to how to implement this in code behind. Can anybody guide so I can get a start and implement it accordingly.
Please Help!!

Related

IBM Worklight - Using the camera in BlackBerry

I am developing an image-scanning application for BlackBerry. The application takes the user to a success page if the correct image is scanned and a failure page is shown on scanning an incorrect image.
I am using the IBM Worklight framework for developing this app.
My question is: How can I open camera for scanning in BlackBerry?
I have developed the same application for iOS using Worklight. In iOS I've used this JavaScript syntax:
WL.native.show(arg1, arg2, arg3);
So I want to know what will be the syntax for opening camera/native page in the case of BlackBerry.
Just to make things clearer, you do not use WL.NativePage.show in order to use the camera in an iOS device. For that you use the Camera API provided by Apache Cordova.
WL.NativePage.show is meant to transition from a WebView to a native page.
You can, however, of course, use it to pass parameters and do whatever you want on the native side and then return to the WebView...
WL.NativePage.show is available only for iOS and Android.
Anyway,
In BlackBerry WebWorks apps (the type of BlackBerry apps supported in Worklight) you have several options:
Use the Camera API provided by BlackBerry
Use the Camera API provided by Apache Cordova
Worklight currently supports Cordova 2.3 (in Worklight 5.0.6.x) and Cordova 2.6 (in Worklight 6.0).

How to execute Blackberry OS 6 app in Blackberry 10 OS

I developed one application in Blackberry OS 6.I deployed that app in to Blackberry world successfully.But it is not working in Blackberry OS 10.I am getting following error:
Unsupported for this device
Please help me how to run application in OS 10.
Thanks in Advance.
OS10 is a completely different system. It no longer supports the BB6/7 Java environment. You will need to port your app to one of the new supported platforms:
http://developer.blackberry.com/develop/platform_choice/index.html
Cascades (c++ & qml)
Webworks
Android
Adobe Air
With WebWorks it is possible to run your application in both BlackBerry 6 and BlackBerry 10, you may need to make some changes to your code, but it is certainly possible and there are plenty of resources available.
You can start from here.
Specifically BlackBerry states:
Your BlackBerry WebWorks app can be targeted to run on a variety of
BlackBerry device models or ported to a different OS, such as iOS or
Android.
Developing your app with BlackBerry WebWorks gives you the flexibility
to target users of the latest BlackBerry devices and those who are
using older models. Depending on the OS you want to target, versions
of the BlackBerry WebWorks SDK available for:
BlackBerry 10
BlackBerry PlayBook
BlackBerry 7 and earlier
See here for a tutorial on creating an application which is able to work on old and new BB devices (Simple Hello World application).
A good article to look at can be found here, which explains some of the fundamentals and differences with webworks.

How to prepare old Blackberry app for BlackBerry 10?

We have a couple of Blackberry apps and are now trying to prepare them for BB 10. These apps are made in Java via Eclipse and/or RIM IDE tool. However, when I went to https://developer.blackberry.com/platforms/bb10, I saw that there is no even a mention of Java SDK. Take a look at image below.
So how am I supposed to update Blackberry app to BB 10? Any ideas?
You have to decide what to do with your applications. If you have an Android version, one option is to repackage the APK to a BAR using the provided tool set so that it will run under the Android player. There are many good Android applications that provide an acceptable or even good user experience this way. Another option is to port your BlackBerry Java application to Android (if there is no existing Android version) then package the Android version for the player. This would also allow you to market the application to Android users. The final option is to port the BlackBerry Java applications to the Native SDK, Cascades, HTML5 or Adobe Air.
The best way forward depends on how tightly integrated into the BB10 system you want to be. While there are facilities provided in BB10 that are the equivalents to those is BlackBerry OS, there have been significant changes required to enable the improvements everyone wants to see on the new platform. If you see BB10 as a significant part of your future business then porting to Cascades would be very worth while.

Blackberry 6 to Blackberry 5

I have a Blackberry 6 Application and I want to convert it to Blackberry 5 Application is there any way I can make it
Can I some way use Blackberry 6 library in Blackberry 5 OR I have to do it all over again for Blackberry 5
So you have an app you created for BlackBerry OS6 and now you want it to work on Blackberry OS5 as well.
You cannot use Blackberry OS6 specific libraries in BlackBerry OS5 . There is nothing like a compatibility package like in Android which will allow you to use new APIs on old operating systems. You will have to build your app based on the old OS5 APIs.
Download the Blackberry OS5 JDE and compile your app, it could throw a lot of errors, if not, happy days. If yes, then you need to find third party libraries, or write your own, to create similar functionality in OS5 as well. If you would like to keep the OS6 APIs in your code base, you can use preprocessors to create the binaries for different OS versions.
Using a preprocessor, you can use OS6 APIs for OS6 onwards, and other APIs for OS5 onwards.
You can Compile your code with JRE 5.Then you can use this code in any OS 5,6,7.But you can't use JRE 6 in 5.

Will blackberry smartphone apps run on the Playbook?

Will a Blackberry smartphone application written in the Java api work on the Playbook without modification?
According to RIM, once the JDE player is released, they will have to be re-packaged which may require re-compiling, to run on the PlayBook. The same applies to Android applications. In either case you will not be able to download native JDE or Android apps and run them on the PlayBook.
The only application SDK path that allows for BlackBerry Smartphone applications to run both on BBOS, Playbook and BlackBerry 10 is the HTML5 WebWorks SDK
Get started by reading the Getting Started Overview Guide
https://developer.blackberry.com/html5/documentation/what_is_a_webworks_app_1845471_11.html
You may also be interested in cloning bbUI.js, a free ui framework that works across BlackBerry devices going back to OS5. bbUI.js targets platform specific native features, like access to hardware apis, while providing a consistent feel.
blackberry/bbUI.js
https://github.com/blackberry/bbUI.js
Best of luck to you.
Yes, RIM has announced that they will release a virtual machine which will play your existing blackberry app. I'm not sure if developers have to re-submit their blackberry apps though.
Playbook will also support Android apps, but developers will have to recompile their apps and submit those to App World.

Resources