Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Wear OS support #25

Open
TheLastProject opened this issue Oct 24, 2020 · 19 comments
Open

[Feature Request] Wear OS support #25

TheLastProject opened this issue Oct 24, 2020 · 19 comments
Labels
common: uncommon Most users are unlikely to come across this or unexpected workflow severity: tolerable Low/no impact on users state: help wanted I looked into this issue but couldn't solve it quickly type: enhancement New feature or request

Comments

@TheLastProject
Copy link
Member

Issue by Sanaki
Wednesday May 16, 2018 at 02:50 GMT
Originally opened as brarcher/loyalty-card-locker#247


Right now Wear Codes (iap for more than one code), Pass2U, and Stocard seem to support Wear OS for loyalty cards. I don't particularly trust either free option and I'd rather not have to use them if possible when I'm already more than happy with this app. While I realize this may be somewhat unlikely, any form of Wear OS support would be very welcome.

@TheLastProject TheLastProject added type: enhancement New feature or request state: help wanted I looked into this issue but couldn't solve it quickly labels Oct 24, 2020
@TheLastProject
Copy link
Member Author

Comment by brarcher
Wednesday May 16, 2018 at 02:59 GMT


Looking this up, my understanding is that the app which runs on the phone is a separate, standalone app. Does this mean that the applications you mentioned actually have two separate apps, one for the phone and one for the watch?

@TheLastProject
Copy link
Member Author

Comment by Sanaki
Wednesday May 16, 2018 at 05:01 GMT


In the case of Wear Codes and Pass2U Wallet, yes. Stocard doesn't appear to and instead likely implements a phone-delivered notification-style screen for the watch to use without having an actual app on the watch. I'll download it later today to check its implementation and report back. Either way though, Wear Codes is the only one of the three I believe isn't selling PII, so while I'll try out Stocard to see how it works, I won't be using it long-term.

Mind you, while the watch apps are technically standalone, in the case of things like this, they're generally extremely limited in functionality and only act as essentially receivers for the phone apps (and often won't function at all without the phone app installed and the phone connected). The better ones (not counting true standalone apps) will mirror the data on the phone for display purposes on the watch, but still usually won't allow modification of the data itself from the watch. Optimal implementation for this app would likely be along those lines. Clone the app's card database to the watch, display from there, but require actual changes and such take place in the phone app.

EDIT: Seems Stocard uses a wear os client app as well. All of them seem to function (approximately) as follows: Open app on watch with phone app installed, it displays a list of cards. Pick card, get barcode/QR code. Can swipe left/right to show the card ID or open it in the phone app. Literally no other functionality present at any stage.

Technically it should be possible to set up display on the watch via a watch notification, but that wouldn't really be optimal for functionality. It -might- be possible to enable a watch notification with control buttons to function as a pseudo-app, but I'm not really sure the effort to make that work would be any less than just making a Wear OS app. Either way, this is probably pretty low priority due to the amount of effort involved, but it'd be a nice feature if it's ever reasonable.

@TheLastProject
Copy link
Member Author

Comment by Sanaki
Wednesday May 16, 2018 at 20:33 GMT


If this ever becomes a matter of interest, I'm more than willing to be a beta test monkey. I have two Wear OS devices available (Huawei Watch 2 Sport and Misfit Vapor) and have a reasonable dev environment. Unfortunately, my ability to help currently falls short of actually helping to write the watch app, or I'd be all over that.

@TheLastProject
Copy link
Member Author

Comment by brarcher
Thursday May 17, 2018 at 02:33 GMT


Reading more on the topic, I agree that the watch app is really a separate app. I do not have a watch myself, so although I could use a simulator to work on it, I could not guarantee I would not unintentionally break it later.

If someone were interested in creating a watch app that works with Loyalty Card Keychain, I would be up for assisting where I could, such as implementing any interfaces on the phone side which would be necessary.

@TheLastProject TheLastProject added common: uncommon Most users are unlikely to come across this or unexpected workflow severity: tolerable Low/no impact on users labels Feb 5, 2022
@TheLastProject
Copy link
Member Author

I'm been asked about this feature IRL and I am planning to implement it as such:

  1. Create a new dangerous permission in Catima (me.hackerchick.catima.READ_CARDS)
  2. Create an intent to get a list of cards and one for detailed card info
  3. See if it is possible to communicate back through WearOS' RemoteActivityHelper. If not, the proprietary part (non-free Google WearOS libraries) will be turned into a separate "plugin" app.

A setup like this should make it very easy to extend Catima with other "plugins" later, like a sync plugin for example (so Catima won't need Internet permission). It should also make it very easy to support other smartwatches (like Bangle.js through Gadgetbridge hopefully).

@stylemessiah

This comment was marked as off-topic.

@Altonss

This comment was marked as off-topic.

@TheLastProject

This comment was marked as off-topic.

@stylemessiah

This comment was marked as off-topic.

@joserebelo
Copy link
Contributor

joserebelo commented Oct 29, 2022

@TheLastProject I am currently working on getting loyalty cards to work with Gadgetbridge - currently got the protocol working for the Amazfit GTR 4, but the base would be reusable by any gadget that supports it. I would be willing to pick this up on Catima, at least the API for apps to interact.

Create an intent to get a list of cards and one for detailed card info

Instead of an intent, couldn't we create a ContentProvider? It can have separate read and write permissions - Gadgetbridge only needs read, but a Sync plugin could write as well.

Not sure how this would make Wear OS support easier / harder - I have 0 experience / knowledge about it.

Wondering if I should open a separate issue from this Wear OS one, even if just for discussion.

@TheLastProject
Copy link
Member Author

I am currently working on getting loyalty cards to work with Gadgetbridge - currently got the protocol working for the Amazfit GTR 4, but the base would be reusable by any gadget that supports it. I would be willing to pick this up on Catima, at least the API for apps to interact.

That would be awesome!

Instead of an intent, couldn't we create a ContentProvider? It can have separate read and write permissions - Gadgetbridge only needs read, but a Sync plugin could write as well.

I completely forgot ContentProvider existed until you mentioned it. From looking that up for about 5 minutes, that actually sounds a lot cleaner!

Not sure how this would make Wear OS support easier / harder - I have 0 experience / knowledge about it.

Same here, I still haven't gotten to working on this (and again, my personal priority is low as I don't use WearOS, I use a Bangle.js with Gadgetbridge :P)

Wondering if I should open a separate issue from this Wear OS one, even if just for discussion.

Sounds like a good idea :)

@00svd00
Copy link

00svd00 commented Nov 8, 2023

Seems that only things you have to do to run this app on Wear OS are:

  1. Remove SearchManager and all binded functions from MainActivity
  2. Slightly modify interface: remove search button, sligtle move menu button to the left in main_activity.xml, simple_toolbar_list_activity.xml and enlarge container(vertical) in loyality_card_view_layout.xml
    Succesfully built it for my Ticwatch 5 pro(don't know if I'm allowed to post my build here)

@TheLastProject
Copy link
Member Author

I think most people are looking for a WearOS app that talks to Catima on their phone so they can keep managing and adding cards on their phone (adding cards on your watch seems difficult, I don't think smartwatches have cameras?)

However, sharing your code changes may still be useful, that way people can run something instead of nothing :) The best place to show your changes would probably be using a Pull Request. Feel free to upload an APK of your changes to there so people can test more easily. I'm not sure yet if that's something that's useful to merge, but it'll hopefully at least kickstart a discussion :)

@00svd00
Copy link

00svd00 commented Nov 8, 2023

You are perfectly right. Smartwatches don't have cameras(at least most of them), so I've added cards to the app on my phone, then exported zip, moved it to smartwatch and imported it to the app on smartwatch. Worked very well, the only complication - Wear OS doesn't have built-in file picker, so I had to install third-party file manager(luckly there are some in play store). For me killer-feature of Catima is simple file sync, without registering accounts for some weird cloud services.

I think I can fork your repo and create Wear OS branch. But I am not a real developer and I don't know java at all))
So I thing it was more like "dirty hacks" rather than "patches, which you will be able to merge"

@TheLastProject
Copy link
Member Author

Makes sense. I understand they're dirty hacks, but having a fork with a separate branch could perhaps make it easier to keep this up-to-date for people who are okay with exporting zip files manually even if it doesn't end up getting merged :)

@00svd00
Copy link

00svd00 commented Nov 9, 2023

@TheLastProject
Copy link
Member Author

Oh, had expected it to be a lot more work than that. I still want to look at a WearOS app that talks to Catima on your phone but this is quite cool until something fancier exists 👍

@00svd00
Copy link

00svd00 commented Nov 10, 2023

As I said - I'm not a developer and I don't know java at all. To be honest - it was second time in my live I've lauched android studio))
It works, it's usable and it's already tested at local store. It has some problems and it slightly lags at startup and of course it can be so much better if rewritten from scratch, but for now - it's OK for me)

@filviu
Copy link

filviu commented Jul 26, 2024

I feel https://github.com/jamie-mh/AuthenticatorPro could be good inspiration. The app has similar premise - it stores totp codes instead of loyalty barcodes and has a companion WearOS app that syncs automagically with the phone app. This way any TOTPs setup on the phones are imediately available on the phone.

You cannot manage entries on the watch, just read them.

Unfortunately I think this sync will only work when using play services.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common: uncommon Most users are unlikely to come across this or unexpected workflow severity: tolerable Low/no impact on users state: help wanted I looked into this issue but couldn't solve it quickly type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants