googlearchive / android-wearcompanionlibrary Goto Github PK
View Code? Open in Web Editor NEWThis sample has been deprecated/archived. Check this repo for related samples:
Home Page: https://github.com/android/wear-os-samples
License: Other
This sample has been deprecated/archived. Check this repo for related samples:
Home Page: https://github.com/android/wear-os-samples
License: Other
In my use case I try to send data with the low level Channel API from the companion app to the wear app (somewhat reverse what the Sample Demo does). I call WearManager.initialize(getApplicationContext());
in both the wear app and the mobile app's onCreate()
. Despite of that when it comes to send the data wearManager.getConnectedNodes();
returns empty node set. Consequently if I try to set wearManager.removeCapabilities(CAPABILITY_FILE_PROCESSOR);
in the main activity of the wear app (which will receive the data), I get an exception from https://github.com/googlesamples/android-WearCompanionLibrary/blob/master/WCL/src/main/java/com/google/devrel/wcl/WearManager.java#L594
How can I overcome that?
I guess there is a typo in the javadoc of method getDataItemsSynchronous(long timeoutInMillis) in WearManager class on the word asynchronously (should be synchronously) . Additionally, it lacks the indication of This should only be called on a non-UI thread.
like other synchronous methods.
Instead of
/** * Retrieves data items asynchronously from the Android Wear network. A {@code timeoutInMillis} * is required to specify the maximum length of time, in milliseconds, that the thread should be * blocked. Caller needs to call {@code release()} on the returned {@link DataItemBuffer} when * done. */
It should be
/** * Retrieves data items <b>synchronously</b> from the Android Wear network. This should only be called on a non-UI thread. * A {@code timeoutInMillis} is required to specify the maximum length of time, in milliseconds, that the thread should be blocked. * Caller needs to call {@code release()} on the returned {@link DataItemBuffer} when done. */
actually WearHttpHelper has a very poor http support.
two question:
When SAMPLE_RATE increases, significant losses occur. What is the reason for this? The speeds of bluetooth connections are sufficient even for the sampling frequency equal to 44100.
I've found such issue in Developer Console. It's not a massive problem, but better to fix it. I look through the source code, it seems to be ok. How do you think?
This error is thrown after WearManager.initialize(this) in Application class.
Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x7f0b0188
at android.content.res.Resources.getText(Resources.java:306)
at android.content.res.Resources.getString(Resources.java:392)
at android.content.Context.getString(Context.java:377)
at com.google.devrel.wcl.n.<init>(SourceFile:121)
at com.google.devrel.wcl.n.a(SourceFile:168)
Problem devices: Xperia M2 (D2303) Android 5.1, Galaxy Ace3, Xperia™ M4 Aqua Dual (E2333)
WCL version: 1.1
I am trying to use the WearFileTransfer
facility to upload a file from the handheld to the watch. Every time I do it I see this log on the watch:
Size of the transferred file doesn't match the original size
Then, I receive the onWearableFileReceivedResult
callback, with a SUCCESS
status, but if I look at the file, it has a 0 byte length (the original file on the handheld is not empty).
Any idea?
I can provide a sample project showing the issue if necessary.
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.