Add support for adding byte array to extra in `app.service.send`
pploszczyca opened this issue · 4 comments
Hi guys, first of all, thanks for the awesome tool!
I encountered some problems while trying to add a byte array by --extra
with app.service.send
. When I reviewed the code in the ServiceBindingProxy#add_extra
method, I noticed that it is currently not supported. It would be nice to include this feature in the next release. Also would be nice to add in docs supported extra types with examples, it could be easier to know what types could be used.
Once again, thanks for maintaining this project 😄
Hi! ByteArray extras are currently broken in 3.0.1, but some work has already been done to bring that functionality in the develop
branch. This currently focuses on Activities, not Services, but porting similar logic over should not be too hard.
Have a look at 24262d4 - once fully tested and pushed, you should be able to supply byteArray extras as UTF-8 strings, or by providing either a hex or base64 representation.
We'll try to port this across Soon™ (or, better still, see if we can avoid duplicating Intent-building logic)
Great! Thanks for the quick response
Okay, I believe I've managed to get app.service.send
to use the same logic as app.activity.start
and app.service.start
. I was able to confirm that ByteArrays could be added to the Bundle using the same syntax as in those cases (see help intents
).
I do not have an app to test bound services against -- so while I've confirmed that these Extra types are handled correctly, there may yet be more bugs in the complete flow :)
Didn't mean to close this issue yet
I only meant to finish the pull request