Search code examples
javablackberryblackberry-10blackberry-simulatorblackberry-eclipse-plugin

Testing a blackberry app on the Blackberry 10 simulator


I have created a blackberry app in Eclipse with java using the blackberry plug-in, and I can use the simulator that is built in just fine to test the app (it says the built in simulator is BB 9900). However, I want to test the app on a Blackberry 10 simulator, but do not have any idea of how to approach it.

I have the simulator installed and it is running fine, but I don't know how to get my app from eclipse into the BB 10 sim. I looked at this page: http://developer.blackberry.com/devzone/develop/simulator/testing_apps_on_the_simulator.html and then went to the eclipse plug-in option, but that is describing android apps and doesn't help very much.

Is there any simple way to load my app onto the simulator?


Solution

  • Short answer. No. There is not even a complicated way. There is NO WAY to load you BB Java application onto a BB 10 device.

    If you look at the BlackBerry Developer page

    BlackBerry Developer

    you will see that you have a number of different alternative development approaches. What the site perhaps doesn't make clear, is that if you develop for BlackBerry OS in Java, you can not then take that application over to BB10. If you want to develop in Java, and run your application on the BB10 devices, then you need to develop using the Android SDK, and use the Android runtime on the BB10 devices to run your application. But if you develop in Android Java, you can't run your applications on BBOS devices.

    The only way to develop (sort of) single source applications that run on both BBOS and BB10 devices, is to develop in html5, i.e. WebWorks aka Cordova.

    I'm hope this has answered your question, but please ask if you require further clarification.

    Update

    Just responding to the various comments added:

    "So, I would have to convert the application over to an Android runtime and then use the Android runtime to run it on a BB10."

    To be precise, you will rewrite it using the Android SDK using Android APIs (which are significantly different), and test it like an Android application. Then you can, in many cases, just take this same executable (called an apk) and use it on BB10 devices (perhaps with a bit of repackaging).

    "once the app is developed using the Android SDK, does that mean it will work with Android phones as well as the BB10?"

    Yes, but there are few caveats, typically things that the BB Android runtime has not (yet) implemented - mapping being a case in point atm. In these cases, you might want to develop an Android version and fork off a Blackberry version that doesn't try to use the functionality that doesn't work on BB10.

    "I recommend you use cascades to make native BB10 apps. It's also easy to make"

    I develop for BB10 in C++/Cascades in preference to Android, but I would not say it was easier or in fact easy. Silly things like no garbage collection mean that C++ can be a bit of a nightmare. I suspect you will be faster coming to terms with Android programming.