Code Monkey home page Code Monkey logo

Comments (23)

obfusk avatar obfusk commented on July 20, 2024 6

I'm hoping to look into supporting this sometime soon.

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024 5

Since 3 years it's not possible when I read the issues. What's so complicated?

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.

This could be done in a few hours.

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)

How can we get this integrated fast?

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.

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024 4

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):

  1. Make a new database table for this, don't try to shoehorn it into the LoyaltyCardDbIds table like I did. The format is just way too different. At most, create an entry in LoyaltyCardDbIds for the basics (so it can be nicely integrated in the rest of the app) with the LoyaltyCardDbIds.ID field being refered to in your PkPass table.
  2. See where to go from there.

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!

from android.

Tycho-S avatar Tycho-S commented on July 20, 2024 2

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.

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024 1

Comment by TheLastProject
Monday Dec 09, 2019 at 16:18 GMT


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.

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by brarcher
Thursday Sep 12, 2019 at 06:18 GMT


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.

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by jeroen7s
Saturday Sep 14, 2019 at 15:42 GMT


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

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by brarcher
Monday Sep 16, 2019 at 04:17 GMT


Ah. If that is the case, what specifically is the ask? Is it to display the barcode data differently if it is pkpass?

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by TheLastProject
Sunday Dec 08, 2019 at 23:22 GMT


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:

{
  "passTypeIdentifier" : "pass.keefmoon.example-generic",
  "formatVersion" : 1,
  "teamIdentifier" : "YAXJZJ267E",
  "organizationName" : "Passbook Example Company",
  "serialNumber" : "0000001",
  "description" : "Staff Pass for Employee Number 001",
  "associatedStoreIdentifiers" : [
  	 284971959
  ],
  "locations" : [
  	{"latitude" : 51.50506, "longitude" : -0.01960, "relevantText" : "Company Offices" }
  ],
  "foregroundColor" : "rgb(255, 255, 255)",
  "backgroundColor" : "rgb(90, 90, 90)",
  "labelColor" : "rgb(255, 255, 255)",
  "logoText" : "Company Staff ID",
  "barcode" : {
  		"format" : "PKBarcodeFormatQR",
  		"message" : "0000001",
  		"messageEncoding" : "iso-8859-1",
  		"altText" : "Staff ID 0000001"
   },
  "generic" : {
  	"headerFields" : [
  		{
  			"key" : "staffNumber",
        	"label" : "Staff Number",
        	"value" : "001"
  		}
  	],
    "primaryFields" : [
      {
        "key" : "staffName",
        "label" : "Name",
        "value" : "Peter Brooke"
      }
    ],
    "secondaryFields" : [
      {
        "key" : "telephoneExt",
        "label" : "Extension",
        "value" : "9779"
      },
      {
        "key" : "jobTitle",
        "label" : "Job Title",
        "value" : "Chief Pass Creator"
      }
    ],
    "auxiliaryFields" : [
      {
        "key" : "expiryDate",
        "dateStyle" : "PKDateStyleShort",
        "label" : "Expiry Date",
        "value" : "2013-12-31T00:00-23:59"
      }
    ],
    "backFields" : [
      {
        "key" : "managersName",
        "label" : "Manager's Name",
        "value" : "Paul Bailey"
      },
      {
        "key" : "managersExt",
        "label" : "Manager's Extension",
        "value" : "9673"
      }
    ]
  }
}

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:

  1. Unzip .pkpass file
  2. Parse relevant info from pass.json
  3. Maybe put some stuff in notes
  4. Discard the rest(?)

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.

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by jeroen7s
Monday Dec 09, 2019 at 22:16 GMT


Thanks for working on this, much appreciated. Found an old plane ticket in my Signal conversations you can use.
Here's the File: https://intuxikated.stackstorage.com/s/LbC7LhgNnvF6CPzz
And a screenshot of how it looks in the "StoCard" app on the play store:
signal-2019-09-07-161903

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 :)

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by TheLastProject
Wednesday Dec 11, 2019 at 13:35 GMT


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.

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by TheLastProject
Wednesday Dec 11, 2019 at 13:45 GMT


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!

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by jeroen7s
Wednesday Dec 11, 2019 at 13:55 GMT


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.

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by TheLastProject
Saturday Dec 14, 2019 at 19:59 GMT


Just sharing some progress. Still quite a lot of work left, especially because of the whole i18n system.

photo_2019-12-14_20-58-59

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by jeroen7s
Monday Dec 16, 2019 at 11:28 GMT


Looks like a great start.
Do you really need the i18n tho?
I think you could add it without translations as a first step and then add translations later?

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by TheLastProject
Monday Dec 16, 2019 at 11:29 GMT


Basic i18n is already working, see pull request :)

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by jeroen7s
Monday Dec 16, 2019 at 11:30 GMT


cool, nice work πŸ‘

from android.

TheLastProject avatar TheLastProject commented on July 20, 2024

Comment by devurandom
Sunday Feb 02, 2020 at 08:36 GMT


Have a look at https://github.com/ligi/PassAndroid, maybe you can borrow / share some code.

from android.

Altonss avatar Altonss commented on July 20, 2024

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...) :)

from android.

e-t-l avatar e-t-l commented on July 20, 2024

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...

from android.

winkler-winsen avatar winkler-winsen commented on July 20, 2024

I stumbled here looking for pkpass support. I've been using PassAndroid with a similar feature set. There you can also import pkpass files.
How about looking for hints in the code there?
https://github.com/ligi/PassAndroid

from android.

Tragen avatar Tragen commented on July 20, 2024

I love Catima when I first tested it but then I realized it cannot import pkpass.
Since 3 years it's not possible when I read the issues. What's so complicated?
Everything is described in the first comments.

Unzip .pkpass file
Parse relevant info from pass.json
Maybe put some stuff in notes
Discard the rest(?)

This could be done in a few hours.
I program in C# so I'm not much help with Java.
How can we get this integrated fast? I'm willing so support this with money.

from android.

Korb avatar Korb commented on July 20, 2024

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

from android.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.