将 Android 应用程序转换为 Blackberry 应用程序

发布于 2024-12-03 19:37:51 字数 618 浏览 0 评论 0原文

我一直在做一些研究,但似乎找不到我正在寻找的具体答案。

有一个适用于 Android 的应用程序,我想在 Blackberry 上编译并运行它。我已经在两个平台上“破解”了应用程序,但我从未将应用程序从一个平台移植到另一个平台。我知道 API 非常不同,其中大部分都需要重新编码,但由于我是一名黑客,所以我需要一个起点。所以我希望做的就是简单地获取 Android 源代码并为 Blackberry 进行编译。我知道由于某些界面项目,这不起作用,但我不知道从哪里开始处理这些项目。所以我的问题是:Android SDK和Blackberry SDK在界面设计方面的主要区别是什么?有人可以给我指出一个比较(如果有的话),或者如果它足够快,有人可以为我突出显示吗?

我要移植的应用程序是由 Google 编写的应用程序,网址为:http:// code.google.com/p/google-tv-remote/ 这是一个 Android 应用程序。我已经查看了源代码,它看起来很简单,可以尝试使用此代码作为基础从头开始编写一个新程序,但我更愿意有一个类似的应用程序来开始自定义,而不是构建一个全新的应用程序。

感谢您的任何建议。

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 available 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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

舂唻埖巳落 2024-12-10 19:37:51
  1. 该应用程序是否使用任何 JNI 或直接硬件操作?作为电视遥控器,我认为它必须(但我可能是错的)。如果是的话,您将面临一项艰巨或不可能的工作,因为黑莓安全模型不允许这些。
  2. 不仅仅是 API 不同,底层操作系统和文件结构也不同。
  3. BlackBerry 对所有应用程序使用单个 JVM,Android 对每个应用程序使用一个 JVM。
  4. BlackBerry Java 基于带有扩展的 J2ME,而 IIRC Dalvik 基于 J2SE。

很抱歉持否定态度,但如果这很容易做到,AppWorld 中将会有更多 Android 应用程序的副本。

  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.

南笙 2024-12-10 19:37:51

我刚刚从此处执行此操作这里相对来说比较轻松。该应用程序相当简单并且使用 WebView。我发现的唯一真正的区别是:

  1. JavaScript 回调可以在 Android 上运行,但不能在 QNX/BlackBerry 10 上运行,因此解决方案很丑陋——使用超时。
  2. BlackBerry 10 对于不从主线程外部调用 UI 元素非常严格,而在 Android 中,只有一个强烈警告,告诉您不应该(而且确实不应该)。

对于一个数据点来说,整个港口花费了不到一天的时间。再说一遍,这是一个简单的应用程序,所以 YMMV。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文