CatimaLoyalty / Android

Catima, a Loyalty Card & Ticket Manager for Android
https://catima.app
GNU General Public License v3.0
730 stars 140 forks source link

[Feature Request] Wear OS support #25

Open TheLastProject opened 3 years ago

TheLastProject commented 3 years ago

Issue by Sanaki Wednesday May 16, 2018 at 02:50 GMT Originally opened as https://github.com/brarcher/loyalty-card-locker/issues/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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 2 years ago

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 commented 1 year ago

Using Storcard on phone AND Watch 4 because no other solution currently exists...its only on the Phone to add the cards...

Why doesnt this have a WearOS version?...people have been asking for years....this is where youre missing most of the market...i rarely if ever get my phone out to scan anything, and in fact i havent in 2 years

Altonss commented 1 year ago

Why doesnt this have a WearOS version?...people have been asking for years....this is where youre missing most of the market...i rarely if ever get my phone out to scan anything, and in fact i havent in 2 years

Catima is only developped by a small team of developpers in their free time, so that's why some features may have not been implemented yet (time is limited). So be patient or you can help developping this feature by opening a pull request :)

TheLastProject commented 1 year ago

Okay, upcoming is a bit of a rant. I see you develop yourself too, so don't take it too personally, but I need to get this off my chest after how the last few months have been. Maybe some parts of this rant even feel relateable and you manage to take a break from your projects before you get this stressed and angry yourself :)

Why doesnt this have a WearOS version?

Multiple reasons:

  1. Because I haven't gotten to it yet because I am just one single person who can only do so much in their spare time. And given I've made almost 1000 commits to this project over the past 2 years you can't say I haven't been spending time improving this project.
  2. I don't have a WearOS smartwatch myself so adding this feature has no benefit for me personally.
  3. I started this project because I care about Open Source and software freedom, yet WearOS is a practically completely proprietary platform. Because even the libraries to communicate with WearOS are proprietary (and thus don't follow F-Droid inclusion criteria) I have to go through extra work to not get Catima kicked out of F-Droid when adding WearOS support. And I care a lot more about F-Droid than support for a Google-controlled platform I don't use myself.
  4. Google has made developing on Catima extremely unfun before which makes me even less interested on working on something new for Google's abusive ecosystem when I can be doing literally anything else.
  5. Nobody who cares more about WearOS than me has come around to help with this.

people have been asking for years

That's always the thing, people are always asking and rarely helping. Always waiting for the main developer to do the work, even though the whole point of Open Source is that everyone can contribute. Everyone cares enough to want it but almost nobody cares enough to put in the work to add it themselves.

I clearly stated just last month I'm planning to implement it and documented how I'm planning to make sure the project won't run into issues with F-Droid while doing so, I just haven't gotten to it yet. There's 58 open issues and the ones that affect me personally will obviously get the highest priority because why should I spend all my spare time writing things for others while getting nothing in return (except the occasional rude email from someone telling me I suck because the app doesn't do the thing they want it to do)?

this is where youre missing most of the market

I have worked on Catima for about 2 years. I've made almost 1000 commits. You know how this "market" has rewarded me for the countless hours I've sunk into this project?

:+1: I received about 15€ worth of donations total (super cool and kind people :heart:, sadly publishing on Google Play costs 50€ and the catima.app domain name isn't free either so I'm still losing money on this project anyway) :-1: I've been insulted over email and in Google Play Reviews by multiple people, ranging from "you ruined everything by changing the background colour, fix it now!!!" to "stupid woman, wake up a man to solve my issue". :-1: I get spam emails asking me to buy 5 star ratings on Google Play every single day.

So, yeah, I don't care about this "market".


Summarizing, here's the deal:

  1. Creating a GitHub issue is nothing more than a request for me to work on something.
  2. I will work on what I want to work on so the project stays somewhat fun (which it really hasn't been lately and annoyed comments about why I haven't done something yet really don't help).
  3. If people want a feature more urgently, they should make a pull request themselves.
  4. I don't owe anyone anything, every single commit is me spending my spare time on giving something away for free and it would be nice if people would appreciate this more.

(P.S.: Talking about appreciation, I really do love everyone who has helped Catima in any way. I love the amazing translators who have done so much work and always respond so quickly (too many people to name, every single one is so valuable), a small amount of awesome coders who sometimes show up to help me (most recently @Kethen, hi, you're awesome), @Altonss for always being there to respond to issues and collect useful information and every single other person in Catima's Contributors screen. Y'all are the reason Catima can sometimes be fun to work on and I hope all of you stick around :heart:)

stylemessiah commented 1 year ago
1. Because I haven't gotten to it yet because I am just one single person who can only do so much in their spare time. And given I've made [almost 1000 commits to this project over the past 2 years](https://github.com/CatimaLoyalty/Android/graphs/contributors) you can't say I haven't been spending time improving this project.

My "team" consists of one. Ive never resorted to flaming someone who created an issue, yet

  1. I don't have a WearOS smartwatch myself so adding this feature has no benefit for me personally.

Theres plenty i do that has no direct personal benefit to me, thats at least half of being a developer

3. I started this project because I care about Open Source and software freedom, yet WearOS is a practically completely proprietary platform. Because even the libraries to communicate with WearOS are proprietary (and thus don't follow F-Droid inclusion criteria) I have to go through extra work to not get Catima kicked out of F-Droid when adding WearOS support. And I care a lot more about F-Droid than support for a Google-controlled platform I don't use myself.

Wanting to be OSS is fine, but again dont flame users when they make a request or submit an issue, especially where the market is insanely huge for addding support

4. [Google has made developing on Catima extremely unfun before](https://www.androidpolice.com/machine-translation-libre-play-store-developer-support/) which makes me even less interested on working on something new for Google's abusive ecosystem when I can be doing literally anything else.

If you arent having fun, then maybe stop, instead of flaming people who submit feature requests or issues, maybe?

5. Nobody who cares more about WearOS than me has come around to help with this.

Thats sad, but also maybe because thats the way you seem to respond to people? I rarely receive help, hasnt stopped me yet, maybe developing isnt suited to you? Getting bitter about it to users certainly wont help.

👍 I received about $0 worth of donations total, mainly because i dont have a donation link as thats not why i am in this. Im also a volunteer of over 25 years in my real life.

If all youre doing is complaining about how bad things is, maybe time to stop, because infecting others with negativity isnt a winning deal.....you should seek out something to make you happy....

joserebelo commented 1 year ago

@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 commented 1 year ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

Here it is https://github.com/00svd00/Android/tree/WearOS

TheLastProject commented 8 months ago

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 :+1:

00svd00 commented 8 months ago

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)