开发者

Converting an Android app to a Blackberry App

I've been doing some research and I can't seem to find the specific answer I am looking for.

There is an app that is av开发者_开发技巧ailable for Androids that I would like to compile and run on Blackberry. I have "hacked" together apps on both platforms, but I have never ported an app from one platform to the other. I know the API's are very different and most of these will need to recoded, but since I'm a hack, I need a starting point. So what I am hoping to do is to simply take the Android source and compile for Blackberry. I know this won't work due to some interface items, but I don't know where to start for those items. So my question is this: What are the major differences between the Android SDK and the Blackberry SDK with regards to interface designing? Can someone point me to a comparison (if there is one) or if it's quick enough, can someone highlight it for me?

The app that i am looking to port is an application written by Google at: http://code.google.com/p/google-tv-remote/ It is an Android app. I have reviewed the source and it looks simple enough to try to write a new program from scratch using this code as a base, but I would much rather have a similar looking application to start to customize, rather than building a brand new one.

Thanks for any advice.


  1. Does the app use any JNI or direct hardware manipulation? As a TV remote I think it must (but I could be wrong). If if does you will be facing an uphill or impossable job because the BlackBerry security model does not allow either of those.
  2. It isn't just the API's that differ, the underlying OS and file structures are different.
  3. BlackBerry uses a single JVM for all applications, Android uses a per application JVM.
  4. BlackBerry Java is based on J2ME with extensions, where IIRC Dalvik is based on J2SE.

Sorry to be negative, but if it was easy to do there would be more copies of Android apps in AppWorld.


I just did this from here to here and it was relatively painless. The app(s) is/are fairly simple and use WebViews. The only real differences I found were that:

  1. JavaScript callbacks work on Android but not on QNX/BlackBerry 10, so the solution was ugly -- use timeouts.
  2. The BlackBerry 10 is quite strict about not calling UI elements from outside the main thread, whereas in Android there is only a strong warning that you shouldn't (and you really shouldn't).

For a data point, the whole port took less than one day. Again, it's a simple app so YMMV.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜