We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I'm sending data on the mobile through
rxWear.data().putDataMap().to("/myPath")
which seems to properly create the Uri and results in wear://<nodeId>/myPath
wear://<nodeId>/myPath
but on the wear I listen like:
rxWear.data().listen("/myPath", DataApi.FILTER_LITERAL)
which gives me: wear:/myPath
wear:/myPath
In your Implementation you create the Uri with a Uri.Builder but do not set the host (which is missing in the above uri)
This bug results has the problem that the listen command is triggered by EVERY data-update, no matter of the specified Uri, see https://developers.google.com/android/reference/com/google/android/gms/wearable/DataClient.html#addListener(com.google.android.gms.wearable.DataClient.OnDataChangedListener,%20android.net.Uri,%20int)
The text was updated successfully, but these errors were encountered:
Hi,
I ran into the same "issue" and figured out I didn't use the proper filter when getting or listening to data or messages.
For data, use:
rxWear.data().get(path).compose(DataItemGetDataMap.filterByPath(path)), rxWear.data().listen(path, DataApi.FILTER_LITERAL).compose(DataEventGetDataMap.filterByPathAndType(path, DataEvent.TYPE_CHANGED))
Note the filterByPath and filterByPathAndType parts. The original examples are with .nofilter(), that's why you get notified for any data update.
filterByPath
filterByPathAndType
.nofilter()
Same goes for messages, use MessageEventGetDataMap.filterByPath(path) if it's needed.
MessageEventGetDataMap.filterByPath(path)
Cheers!
Sorry, something went wrong.
No branches or pull requests
I'm sending data on the mobile through
rxWear.data().putDataMap().to("/myPath")
which seems to properly create the Uri and results in
wear://<nodeId>/myPath
but on the wear I listen like:
rxWear.data().listen("/myPath", DataApi.FILTER_LITERAL)
which gives me:
wear:/myPath
In your Implementation you create the Uri with a Uri.Builder but do not set the host (which is missing in the above uri)
This bug results has the problem that the listen command is triggered by EVERY data-update, no matter of the specified Uri, see https://developers.google.com/android/reference/com/google/android/gms/wearable/DataClient.html#addListener(com.google.android.gms.wearable.DataClient.OnDataChangedListener,%20android.net.Uri,%20int)
The text was updated successfully, but these errors were encountered: