How to build Phonegap Build application for Android Wear?

无人久伴 提交于 2020-01-03 19:29:12

问题


I would like to build a pure HTML5 and Javascript based Phonegap application, that can be build with Phonegap Build and be able to deploy it to Android Wear.

If this is possible at this moment, then what steps should be taken?

My research so far:

  1. There is a notice on Phonegap Build forum about Ball Escape game, that is reported to be built with Phonegap and ready to be run on Android Wear. But, there are no details on how this was done except a meaningless comment by Phonegap Build rep Amir, that someone did this.

  2. I went through Building Apps for Wearables, but found nothing on this matter so far.

  3. Questions like https://stackoverflow.com/q/29834268/1469208 or Run Phonegap application, that supports HTML5 and Javascript on Android Wear brings no actual answer to my question. Second one even seems to be against, as given answers claims, that it is not possible to build HTML5 based application for Android Wear as it supports only Java based native apps. But, then again, there is Ball Escape game, whos author claims, that it was done in Phonegap.

I know, that I can use CocoonJS from Ludei to build HTML5 based application for many platforms, including Android Wear, pretty much like I do this in Phonegap (Ludei also offers cloud-based build of their apps and it even seems free). But, I have some doubts about performance for my simple data transfer application, because CocoonJS seems to be optimized for high-performance games instead. Plus, I'd like to avoid switching Phonegap to another environment, if that would be possible.


回答1:


@trejder, at the moment, you have it correct. There is very little support for AndroidWear, but that is not to say that it is not possible. Most Phonegap Apps depend on Java (or the Equivalent on platforms other than Android) to do the heavy lifting. If you are seeing some tools, it is likely you will see more.

One alternative is to team up with a Java author to write the most basic portions you need, but I have found little luck in this.

However, given all this, I would not fret. Over the last two years many of the wearables (I've seen) in the wild are using BLE (Bluetooth Low Energy). If this is so, for the wearables you are look at, then you are in luck.

Bluetooth Developer Forum https://developer.bluetooth.org/Community/Pages/default.aspx

Leading Bluetooth Developer tools for Linux http://www.bluez.org/

Best of Luck, Jesse



来源:https://stackoverflow.com/questions/30500875/how-to-build-phonegap-build-application-for-android-wear

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!