Sending JSON as extra data in an android broadcast via ADB gets incorrectly formatted

前端 未结 4 667
暖寄归人
暖寄归人 2021-01-04 07:42

I\'m trying to send JSON data as extra on an Android broadcast which I send via ADB to the device. But it looks like the data which gets to the device is not as expected.

4条回答
  •  离开以前
    2021-01-04 08:08

    i know this is an old post, but i have some thoughts.

    after struggle to pass data through cmd and bash args, or subprocess in program, i found use base64 to encode json dumped data is extremely convenient, just base64 decode and then json loads, no worry about quote, space, tab, anything.

提交回复
热议问题