-
• #2
- Will Bangle JS screen resolution 176x176 enough to show a barcode?
- why do you need to send a barcode multiple times? Load that into the watch once and then just show.
- Will Bangle JS screen resolution 176x176 enough to show a barcode?
-
• #3
Will Bangle JS screen resolution 176x176 enough to show a barcode?
Well, it'll be small, but I'd hope so. I am carefully optimistic seeing how clear the screen is.
why do you need to send a barcode multiple times? Load that into the watch once and then just show.
I'm not completely sure what you mean here, could you elaborate?
-
• #4
do you really need to send barcodes from Android to Bangle each time a user wants to show a barcode in a store?
-
• #5
Here are some links! :)
Gadgetbridge Bangle.js flavor documentation - intents. Maybe you want to do something with http-requests? There's some info about that here as well.
-
• #6
Do you really need to send barcodes from Android to Bangle each time a user wants to show a barcode in a store?
Well, it seems like the best user experience as it allows you to keep managing your loyalty cards on your phone instead of having to duplicate the cards you care about.
Maybe you want to do something with http-requests? There's some info about that here as well.
That is an option, but intents are the more "native Android" option. With intents I wouldn't have to have a long-running webserver process and Android natively supports shielding intents behind permissions so only apps you've given the relevant custom permission can call the intent (Gadgetbridge would be one of those apps).
Sending intents from android to Bangle.js is possible.
Thanks, I had trouble finding anything like this in the documentation. So,
com.banglejs.uart.tx
it is. I suppose I could send an intent with a "callback intent name", so non-Bangle.js watches could easily relate to their intent.This could work, thank you :) Lot of work and I have other tasks to complete first, but I have a route to explore now :)
-
• #7
Do you really need to send barcodes from Android to Bangle each time a user wants to show a barcode in a store?
Well, it seems like the best user experience as it allows you to keep managing your loyalty cards on your phone instead of having to duplicate the cards you care about.
Sending bitmaps via BLE each time may be not a best way to do it.
Barcodes are basically 1 row of pixels expanded vertically. I would send 1 row bitmap and then expand it in Bangle JS. 176/8 will be just 12 bytes. -
• #8
Well, the "standard" barcodes are. But Aztec, Data Matrix, PDF 417 and QR codes are not. So this optimization would only be possible for some barcode types.
-
• #9
Hmm, all cards I have have "standard" barcodes. :)
Another way of optimization - to get a checksum(like md5) from a bitmap and put it in local cash. Android will send list of card names with checksums, Bangle app will check checksums in local cash, if not found it will request to download it from Android. -
• #10
Hi! Adding support for Bangle.js in your app sounds great!
Hopefully
com.banglejs.uart.tx
should work pretty well for you - in fact you may not actually need to have an app on the Bangle at all - you could just send everything you want to execute (including the menu itself) as JavaScript code tocom.banglejs.uart.tx
.That way it'd 'just work' without needing a specific app installed on the Bangle first.
-
• #11
Oh, that's cool!
-
• #12
Hmm, well, I guess I can start with a "Send to smartwatch" feature maybe, to keep it simple. But it still feels incorrect for Catima to contain the logic for Bangle.js' UI. Useful for prototyping though!
-
• #13
it still feels incorrect for Catima to contain the logic for Bangle.js' UI
Since the menus are in Bangle.js already, the UI logic is probably just sending
E.showMenu({"Barcode 1": ()=>Bluetooth.println(...), "Barcode 2": ()=>Bluetooth.println(...), ... });\n
so it's not too bad.Up to you what you want to do, but if you have a separate app then you've also probably got to add extra logic in there to check that the Bangle.js app is installed and the version matches your Android app (in case at some point you need to change the protocol).
Personally, I think it would be nice to be able to use the Bangle to display barcodes without needing the phone connected (while still using the phone to actually manage everything). If that's the case then a Bangle.js app would make far more sense though - and you could use Catima to just sync the barcode data that's on the Bangle...
-
• #14
Any news on this? I once had the crazy idea of wanting Opentasks tasks on the bangle without the need of modifying open tasks at all. Didn't dig into it too much for lack of knowledge on the android layer, but my idea was to use the share button which would produce a text, send it to gadgetbridge as a FW/App (the menu is there but I'm not sure it works, it didn't when I tried) and maybe have it ask what name should the file have on the bangle.
Not a real synchronization but quick and easy for the use case in which you want to put something once on your bangle from any app (a shopping list or a train ticket from catima), which could be displayed and managed by a companion app on the watch itself.
Do you think this can be useful? How much of this can already work/can be done with low effort? -
• #15
.
-
• #16
I haven't made any progress on this myself. However, the Gadgetbridge team passed by and started doing https://codeberg.org/Freeyourgadget/Gadgetbridge/pulls/2953, which hopefully helps.
-
• #17
Good to know, looks promising!
Hey everyone,
I'm the developer of Catima, an Open Source loyalty card app for Android. People have been asking for WearOS support, but I am kinda not looking forward to supporting only proprietary platforms, so I've been trying to figure out if I can support Bangle.js instead.
Specifically, I want to support getting a list of your loyalty cards and when clicking a card show the barcode. This would need at least some kind of 2-way communication and I was wondering if it's possible to:
Is this possible? And if data is sent back somehow, is it possible to send an image file back so that the Bangle.js won't need any code to render barcodes itself?
Thanks in advance for any answer :)
P.S.: Is there any reason why the forum doesn't have a valid SSL certificate? Could this be fixed by any chance?