-
• #2
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
category
keyword is changed tocategories
and now takes a list of strings instead of just a string and the user can set any flags they want. See more here and here.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
reddit2
andreddit3
Gadgetbridge will default to broadcasting while what you need is to start an activity withtarget:"activity"
. Onreddit2
the action can't be the short representation,"ACTION_VIEW"
, used - I believe. -
• #3
I tried your intent and got the attached log. At the end there I get an instruction to use the flag
FLAG_ACTIVITY_NEW_TASK
. If you do to you're probably on a newer nightly Gadgetbridge release and you need to add that flag yourself withflags:["FLAG_ACTIVITY_NEW_TASK"]
.
1 Attachment
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.
https://github.com/gfwilliams/Gadgetbridge/commit/60c7f79366f3d62df711bd0d87c333bd8e67f11d#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?