Trying to open a URL on Android using an intent #5279
Replies: 1 comment
-
Posted at 2022-10-05 by @thyttan Hi! What Gadgetbridge version do you use? What android version are you on? Have you given Gadgetbridge all the permissions it asks for? Have you cheched the box for 'Allow Intents' in Bangle.js specific settings in Gadgetbridge? Does the log say "Sending intent:" or "Executing intent:" somewhere? If you are on a newer nightly release of Gadgetbridge there are small changes to how things are handled. Mainly, the Looking at your test code I think your first attempt looks alright, I would test it myself but my bangle is acting up at the moment. The other two will not work per design. With both Posted at 2022-10-05 by @thyttan I tried your intent and got the attached log. At the end there I get an instruction to use the flag Attachments: |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2022-10-05 by user149778
I love tinkering with the Bangle2. It's so fun.
My goal is to write an app that opens a URL in the browser on my Android device. I was hoping the right way to do this is to send an intent with code like this. I'm unsure what the correct intent would look like, and tried a variety of ideas but none seemed to work. However, there is a weird thing in the Android ADB logs that suggest perhaps this isn't the issue anyway.
Strangely, when I look at the android adb logs I see this:
In other words, the code to receive the JSON is getting a "<" character at the front of it, which means it hits this line and does not try to parse it.
gfwilliams/Gadgetbridge@60c7f79#diff-28d26af2b02f3df362db1ead5920145a8d90650859a256590ddf1e0926d3368bR425
(
)
Is there something I'm doing wrong with Bluetooth.print() or JSON.stringify() that is adding this extra character? Or, a work around?
Beta Was this translation helpful? Give feedback.
All reactions