Skip to content
New issue

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

Support for byte [] #7

Open
greenspand opened this issue May 7, 2015 · 3 comments
Open

Support for byte [] #7

greenspand opened this issue May 7, 2015 · 3 comments

Comments

@greenspand
Copy link

Hi, Great Library by the way. Works like a charm. However, I wanted to ask if in future releases you will support byte[]. The simple reason is that I use proto-buffers in all my wear projects. Reason is obvious, it is faster than Serializable or Parcelable and it is cross platform. I do have to send my messages as a byte[]. The only way I can do it with BusWear right now is by using the Object Parcelable approach, but this would defy the purpose of using protobuffers in the first place. I think it would be awesome if there would be byte [] support. One wouldn't need Parcelable anymore, instead protobuffers which are platform agnostic. What do you think?

@greenspand
Copy link
Author

BusWear is a wrapper for the Data and Messgae API right?

@tajchert
Copy link
Owner

tajchert commented May 7, 2015

It is for Message API only.
Do you want to receive byte[] such as onEvent(byte[] array)? Or to receive in onEvent() your unparsed object from byte[](like currently)?

@greenspand
Copy link
Author

I would like to be able to receive onEvent(byte[]array) and send EventBus.getDefault.post(byte[]array);
I just need the byte[] array data type option.
The reason is that I am transforming my protobuffer models into a byte [] and on the other side, the wear app, back to my Objects.
I use this library from Suare, for the protobuffer:
https://github.com/square/wire
It would be great if you could implement this option, think of all the interoperability, speed and ease of use. You wouldn't need Parcelable or Serializable, hence protobuff is a binary format. Based on my queries, protobuffer is faster than Pracelable and Serializable. So you would get the Object advantages at the speed of binary. For The DataApi it works, I tested it on my apps and its super fast. I don't know on the Messages API, is there a payload limit?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants