You are reading a single comment by @rigrig and its replies. Click here to read the full conversation.
  • That's the basic idea, except we don't want to do it in the android app, but in the messages library, so it also works with ios.

    So it becomes

    1. A message is sent from Gadgetbridge to the Bangle.
    2. The Android app receives the Gadgetbridge message.
    3. The Android app tells the messages library it has a new message.
    4. The messages library emits a signal saying it has a new message.
      THEN
    5. A custom app acts on the signal, doing whatever it does.
    6. The messages library sees that something acted on the signal, and does nothing else.
      OR
    7. Nothing receives the signal
    8. The messages app sees that nothing acted on the signal, and launches the default app.

    I've pretty much already done this here, except that is written as a replacement messages app, so it needs to be adapted into messages/lib.js changes instead. (And then the replacement app won't need its own library anymore, yay)

    And as @Gordon noted above, there is a PR waiting which also makes some drastic changes to the library. Also rewriting it into an event driven system might complicate merging "a bit" ;-)

About

Avatar for rigrig @rigrig started