tgardner / cordova-androidwear Goto Github PK
View Code? Open in Web Editor NEWAndroid Wear Cordova Plugin
License: Apache License 2.0
Android Wear Cordova Plugin
License: Apache License 2.0
Do i need to do anything on the Android Wear Smartwatch for the example to work?
So far i build this on my phone device, and it seems to be fine for onConnect
where i can see the alert, but onDataReceived
isn't being triggered. The smart watch has dev mode turned on and its paired with the phone as well.
Is there any way to link a native Android Watch app to an Cordova iOS App? The plugin works with an Android smartphone, but I can't find any example for iOS. Is there a way to link your Android Wear .apk to your iOS xcode project?
Please fix the plugin installation package!!!
Fetching plugin "net.trentgardner.cordova.androidwear" via cordova plugins regis
try
npm http GET http://cordova.iriscouch.com/registry/_design/app/_rewrite/net.tren
tgardner.cordova.androidwear/-/net.trentgardner.cordova.androidwear-0.0.3.tgz
npm ERR! fetch failed http://cordova.iriscouch.com/registry/_design/app/_rewrite
/net.trentgardner.cordova.androidwear/-/net.trentgardner.cordova.androidwear-0.0
.3.tgz
Hi Tgardner,
Do you have a working example for WearOS 2.0 (with a standalone watch app) that sends and displays text on the watch?
Kind Regards,
Bence
Getting build errors as follows:
Severity Code Description Project File Line Suppression State
Error ....\WearProviderService.java:16: error: cannot find symbol
Severity Code Description Project File Line Suppression State
Error import com.google.android.gms.wearable.CapabilityClient;
Getting the same error for all com.google.android.gms.wearable imports
Environment Setups
Windows 10
Cordova 8
Android 7
minimum sdk 23
target 26
All android packages for sdk 24 up are installed
Let me know if you have seen this or if you need more information from me. I can't share a ton on the app I am developing. Am under NDA.
error log.txt
Just wondering if this project is still active? if Yes, plans for wear 2.0?
If I implement this as a cordova plugin in Intel XDK and try to renew the debug module, the builder states it fails, but fails to give a reason as to why.
Intel XDK does not provide a res/raw folder and as such can't bundle the packages as described in the documentation you linked.
I am very new to Android Wear and Cordova and therefore I unfortunately have to admit that I don't understand how to use this plugin. Is there any example project you can recommend to me? Just a really simple project to understand the basics would be great. Or maybe you have any tips where I can get some information to make Android Wear apps with Cordova? A blog entry or anything similar would be very much appreciated!
ERROR in WearProviderService.java (lines 24, 25 and more):
com.google.android.gms.wearable.NodeApi is deprecated
com.google.android.gms.wearable.MessageApi is deprecated
NodeApi: This interface was deprecated. Use NodeClient instead!
MessageApi: This interface was deprecated. Use MessageClient instead!
#tgardner please update the plugin! Thanks! :-)
Hi,
ich would like to integrate your plugin in my project. So i have a existing android wear app. So after packing the app , i add the app to my cordova project. How can i use your plugin. Should i add the java classes to my wear project or to my nativ code in my cordova project.
Hi @tgardner ,
Thank you for making this plugin .
The plugin have been installed successfully but I still not be able to send or receive any messages .
To test the plugin I have made a simple wear app witch shows the received messages and sends a simple String "Hello from Wear" to a simple cordova app ( with the path : "net.trentgardner.cordova.androidwear.NewMessage" ) .
this is my onDeviceReady function :
onDeviceReady: function() {
app.receivedEvent('deviceready');
AndroidWear.onConnect(function(e) {
alert("Connection Successfully Established - handle: " + e.handle);
AndroidWear.onDataReceived(e.handle, function(e) {
alert("Data received - handle: " + e.handle + " data: "+ e.data);
});
AndroidWear.sendData(e.handle, "Hello From Cordova!");
});
}
After running the cordova app in my phone device I receive this Alert : ( Connection Successfully Established - handle : df58e11e ) witch means that the onConnect function has been successfully called . But in the wear app I don't receive anything and after sending the String from the wear app I don't receive also anything in the cordova app .
I would like to mention that the wear app is working without problems with another native android app .
Thanks in advance !
after executing cordova command: cordova plugin add
it give me the error:
Fetching plugin "net.trentgardner.cordova.androidwear" via cordova plugins registry
npm http GET http://registry.cordova.io/net.trentgardner.cordova.androidwear
npm http 200 http://registry.cordova.io/net.trentgardner.cordova.androidwear
npm http GET http://cordova.iriscouch.com/registry/_design/app/_rewrite/net.trentgardner.cordova.androidwear/-/net.trentgardner.cordova.androidwear-0.0.3.tgz
npm ERR! fetch failed http://cordova.iriscouch.com/registry/_design/app/_rewrite/net.trentgardner.cordova.androidwear/-/net.trentgardner.cordova.androidwear-0.0.3.tgz
npm http GET http://cordova.iriscouch.com/registry/_design/app/_rewrite/net.trentgardner.cordova.androidwear/-/net.trentgardner.cordova.androidwear-0.0.3.tgz
npm ERR! fetch failed http://cordova.iriscouch.com/registry/_design/app/_rewrite/net.trentgardner.cordova.androidwear/-/net.trentgardner.cordova.androidwear-0.0.3.tgz
npm http GET http://cordova.iriscouch.com/registry/_design/app/_rewrite/net.trentgardner.cordova.androidwear/-/net.trentgardner.cordova.androidwear-0.0.3.tgz
npm ERR! fetch failed http://cordova.iriscouch.com/registry/_design/app/_rewrite/net.trentgardner.cordova.androidwear/-/net.trentgardner.cordova.androidwear-0.0.3.tgz
Fetching from cordova plugins registry failed: connect ETIMEDOUT 173.192.57.105:80
Fetching plugin "net.trentgardner.cordova.androidwear" via npm
npm http GET https://registry.npmjs.org/net.trentgardner.cordova.androidwear
npm http 404 https://registry.npmjs.org/net.trentgardner.cordova.androidwear
TypeError: Cannot read property 'latest' of undefined
at next (C:\Users\damir.mailybayev\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\lib\cache.js:687:35)
at C:\Users\damir.mailybayev\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\lib\cache.js:675:5
at saved (C:\Users\damir.mailybayev\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\npm-registry-client\lib\get.js:142:7)
at C:\Users\damir.mailybayev\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\npm\node_modules\graceful-fs\polyfills.js:133:7
at FSReqWrap.oncomplete (fs.js:82:15)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.