• That looks great! Sorry for the lack of replies - been a bit busy lately.

    Any chance of committing your PebbleKit changes back into Gadgetbridge? That seems like it'd be a great way to use existing functionality. Perhaps use the 'allow intents' setting in Gadgetbridge to 'gate' it :)

    it uses your gadgetBridge commit to allow sending intents to the watch, I don't know if this is the intended use though. You can do whatever you want on the watch from intents now, which is nice, but might be a bit of a security issue.

    Yes! That's the idea. The intents are disabled by default now so I think it's ok. Honestly, I think nowadays if you have code you don't trust running on your phone, you've got all kinds of problems - and access to your wristwatch probably isn't one of them :)

    I guess for most purposes it would be enough to have the current line method

    Not sure I understand. You mean the pebblekit code?

    Maybe an intent to start/stop apps on the watch

    Could do, but I guess you can just send load("messages.app.js") now and you'll be ok...

  • I realized I didn't use much of the pebbleKit things, so once I saw your intent broadcast receiver I just used that instead, but with \u0010 so it would execute a javascript line. So I didn't change anything at the Gadgetbridge side.

            val jsonData = JSONObject(data)
            jsonData.put("t", "bangleOSM")
            sendDataIntent.putExtra("line", "\u0010GB($jsonData)\n")

    and indeed the app loading also works (created an android app to load the tasks from OpenTasks into the todolist watch app and open it)

     sendDataIntent = new Intent("com.banglejs.uart.tx");
     sendDataIntent.putExtra("line", "\u0010load(\"todolist.app.js\");\n");

Avatar for edb @edb started