且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何构建PhoneGap Build应用程序Android Wear?

更新时间:2022-12-29 23:12:03

@trejder,
现在,你有它正确。有很少支持AndroidWear,但这不是说,这是不可能的。大多数PhoneGap应用程序依赖于Java(或Android以外的平台上的等效)来做重大的工作。如果你看到一些工具,它很可能你会看到更多。



一个替代方法是与Java作者合作写出您需要的最基本的部分,但我发现这方面运气不大。



但是,考虑到这一切,我不会担心。在过去两年里,许多可穿戴设备(我看过)在野外使用BLE(蓝牙低功耗)。



蓝牙开发者论坛
https://developer.bluetooth.org/Community/Pages/default.aspx p>

领先的用于Linux的蓝牙开发工具
http://www.bluez.org/



***的运气,
Jesse


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 How can i add a Android wear package to phonegap project? 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.

@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