-
Notifications
You must be signed in to change notification settings - Fork 29
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 #309
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. |
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. |
.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: