-
-
Notifications
You must be signed in to change notification settings - Fork 165
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
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. |
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 |
Ah. If that is the case, what specifically is the ask? Is it to display the barcode data differently if it is pkpass? |
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. |
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. |
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 :) |
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. |
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! |
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. |
Just sharing some progress. Still quite a lot of work left, especially because of the whole i18n system. |
Looks like a great start. |
Basic i18n is already working, see pull request :) |
cool, nice work 👍 |
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. |
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 :) |
Hey all, I think I got something that works well enough. I put up a debug build on #2038 (comment). If anyone has time to check, please try it and report if you run into any new issues. Depending on the severity, I might fix them before doing a new release or delay the fix for the next release. Thank you! |
Just downloaded, I'll try it in the next days. P.S. Why you don't release debug builds using GitHub pre-release tag? It would be better for us to install |
Not working for me, sorry. When I open a file from the system file manager (and say open in catima) the app crashes. It asked me to clear cache the second time because "the app has a bug" - I think this was a system dialog, not from catima. But even after doing so it didn't work. When I press the + and then say "more options" and choose the pkpass from there, it doesn't actually do anything. It doesn't import it. But the app doesn't crash. Please contact me directly for more info as I'm reluctant to share the pkpass file or debug log here in the public topic which might contain parts of the ticket :) |
Are you using the newest build on #2038 (comment)? I updated it with some fixes after posting the initial link and several people reported those fixes working for them. I also don't know how to contact you directly, your GitHub profile shows no contact options. So please contact me instead and send me the file so I can check, check my GitHub profile for an email and link to my website with more contact options :) |
@AT181903 I don't want to spam the release tags and keep bumping the version number, I also don't want to spread this beyond a few testers, it's a quick debug build, not a release in any way :) |
Tried with two different pkpass and it works correctly |
I did use the one at the end of that thread, yes. And I only downloaded and installed it tonight. I only have one file right now, maybe there's some weird edge case with it.
I thought there would be a direct message thing in GitHub or something :) I don't use GitHub that often. I'm not a developer. I'll contact you tomorrow about this!
…________________________________
Are you using the newest build on #2038 (comment)<#2038 (comment)>? I updated it with some fixes after posting the initial link and several people reported those fixes working for them.
I also don't know how to contact you directly, your GitHub profile shows no contact options. So please contact me instead and send me the file so I can check, check my GitHub profile for an email and link to my website with more contact options :)
|
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: