-
-
Notifications
You must be signed in to change notification settings - Fork 151
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
Pkpass file support #48
Comments
Comment by brarcher This app uses the ZXing library for barcode support. Looking at the list of formats supported by that library: https://github.com/zxing/zxing/#supported-formats it does not appear that it is supported. If that project supported the format, there may be a case for adding support for it here also. That project is in maintenance mode, though, so I'm not sure how likely it is. |
Comment by jeroen7s Pkpass is not directly a barcode format, but a file format containing info card-ids/private keys instead of a numeric barcode, which would make it outside of the scope of the zxing project |
Comment by brarcher Ah. If that is the case, what specifically is the ask? Is it to display the barcode data differently if it is pkpass? |
Comment by TheLastProject I've done a bit of research on this. Pkpass is commonly used for tickets (think plane tickets or CCC). They're actually zip files containing a pass.json file together with some other to us unimportant stuff. Taking as example https://github.com/keefmoon/Passbook-Example-Code/blob/master/Pass-Example-Generic/Pass-Example-Generic.pkpass The pass.json file looks as follows:
While containing a lot more info than a loyalty card, we could most likely just use the description as name and the info in the barcode JSON field to generate the barcode. And maybe somehow put some of the other info in notes after supporting multiline notes first. So, supporting this would be:
Actually not super hard. I think it makes sense to support, although probably only in a basic form. There are other apps like PassAndroid which support this format fully and are better suited for the more complex cases. |
Comment by TheLastProject I started with this in #327. @jeroen7s As you requested this feature, is there any way you could possibly supply me with some pkpass files and screenshots of how they look like in other apps, if you have any you are willing to share? That will help me ensure the best possible result as I know better what to work towards. |
Comment by jeroen7s Thanks for working on this, much appreciated. Found an old plane ticket in my Signal conversations you can use. P.s. I wasn't aware there was already an open source app for this, couldn't find "PassBook" at the time, though having it inside the same app as my loyalty cards would be really nice :) |
Comment by TheLastProject Would it be acceptable if I add your flight ticket as a test case? I assume you're not worried about privacy risks because you already posted it on a public bugtracker, but I'd like to make sure just in case. |
Comment by TheLastProject On an unrelated note, I absolutely love how the first in-the-wild card I get sent to test with violates the spec every so slightly (incorrect colour code format). Good job, Eurowings! |
Comment by jeroen7s You can use it for a test-case, however i'd prefer it if you blank out my name tho :D, aside from that you can use it. |
Comment by TheLastProject Just sharing some progress. Still quite a lot of work left, especially because of the whole i18n system. |
Comment by jeroen7s Looks like a great start. |
Comment by TheLastProject Basic i18n is already working, see pull request :) |
Comment by jeroen7s cool, nice work 👍 |
Comment by devurandom Have a look at https://github.com/ligi/PassAndroid, maybe you can borrow / share some code. |
Okay so... looking back at my code now... wow it was not maintainable. I am very glad @brarcher never merged it back in the days. Basically, this needs a complete rewrite. From scratch. While #69 can be used as reference, https://github.com/ligi/PassAndroid should be taken as reference much more. So, it anyone wants to rewrite this (because I still think it is welcome in Catima):
I'm sorry for dropping this after all this time, but PassAndroid is a very good app and my previous implementation was just not maintainable. I am willing to help anyone who wants to take this up though! |
I recently discovered https://apps.kde.org/fr/itinerary/ which seems to work very fine also for tickets (train/plane...) :) |
Does KDE Itinerary also do Catima stuff like loyalty cards, gift cards, etc? It would be nice to have one app that handles EVERYTHING involving a bar/QR code... |
I stumbled here looking for pkpass support. I've been using PassAndroid with a similar feature set. There you can also import pkpass files. |
I love Catima when I first tested it but then I realized it cannot import pkpass.
This could be done in a few hours. |
The worst complexity is the internationalisation part I suppose. But primarily, the issue is that Catima is a side project and I have a fulltime job and I want to also have time left to spend on other things in my life :) A lot has changed in Catima since I last put time into this feature though, so it may be easier or harder now, no clue.
Given I tried this before (as mentioned in #48 (comment)) I very much doubt it's that simple. Adding a feature in a maintainable way and ensuring stability in a wide range of conditions tends to take a fair share of time too. (Also, assuming every open issue is "just a few hours" that's still over 100 hours of work. Everyone always considers their own feature most important, so someone is going to be upset no matter what I prioritized and I learned to just prioritize for my own needs)
There is probably no way to get this integrated fast because I still have a huge to-do list (see all the open Pull Requests, it'd be rude to ignore those who already submitted code) and I kinda burned myself out over Hacktoberfest (I was spending pretty much all my spare time every single day on Catima during it). The fastest way is probably for someone else to work on this, but I have seen that recently a lot of people are interested in this feature again (I haven't heard any request for this feature in years, it is mostly the last few weeks after Catima got mentioned in C't so it mostly seems to be a popular feature in Germany) so I may pick it up after I've finally gotten to dealing with the currently open pull requests but that'll take a while still. |
It would be great to have this.. Pkpass is pretty much an industry standard now, and because Android doesn't have a competing standard, I see companies gravitating more towards it. Airline tickets, event tickets etc. I'm in Spain by the way, not Germany but it's used a lot here too. Right now I use StoCard but it's a horrible datamining app, I didn't know about PassAndroid, I will try it instead. But if Catima could do it that would be so great :) Not trying to push because I understand that your hands are full :) But I just wanted to explain the desire for this feature. PS: Thanks for all your work on Catima, it's a really nice app. |
I'm hoping to look into supporting this sometime soon. |
For the sake of completeness, it is worth mentioning that this standard was developed with the support of Apple Inc., and the main documentation is located at https://developer.apple.com/documentation/passkit_apple_pay_and_wallet/pkpass |
I'm trying to take another stab at this in my spare time. I'm having some trouble hunting down good test cases though. So if you have any .pkpass files, especially ones with localization, that you're okay with sharing that would be great. It would be even greater if I'd be allowed to include your .pkpass files in the Catima git repository as unit tests. Feel free to censor some parts (but please do tell me what you censored so I know the manifest correctly won't match and what to look at if things behave weird). If you have some passes you're willing to share with me but not post publicly, feel free to email the email on my GitHub profile :) Thanks! Edit: Thank you GitHub and Fediverse users! I think I have enough passes with a wide enough variety to be able to implement this well :) |
Issue by jeroen7s
Saturday Sep 07, 2019 at 14:40 GMT
Originally opened as brarcher/loyalty-card-locker#309
.pkpass is a file format specifically for "tickets, passes, coupons or member cards, and also student IDs, loyalty cards"
https://www.file-extension.info/format/pkpass
It's supported by some other popular apps like StoCard, and used by airlines
The text was updated successfully, but these errors were encountered: