PassAndroid icon indicating copy to clipboard operation
PassAndroid copied to clipboard

FR: Parsing field types

Open neil-s opened this issue 7 years ago • 1 comments

Apple's specification of the Passbook standard says that there are 4 types of fields:

  • header
  • primary
  • secondary
  • auxiliary

This request is to parse those field types separately, rather than reading them all as interchangeable fields.

The reason I suggest this, is I was going to take a stab at improving the visual design of the pass view, to make it match the spec. For example, boarding passes should show the primary fields (usually source and destination) in large fonts, with an icon indicating the direction of travel. Having this visual design will make it more likely for airport agents to skim and accept my boarding pass when I show it to them in PassAndroid.

However, I can't make these visual design changes at the moment because the base information isn't there to indicate which field is which type.

Changing the Pass structure to include this information seems like a more complex change for someone like me who doesn't know the architecture of the app, so I'm hoping you can make it. As a first stab, perhaps you could just add a field within each PassField, called "type", with possible values "header", "primary", "secondary" and "auxiliary". That way, a lot of the other code that uses PassFields can just ignore this information.

I know that this might be unneeded for Espass files, but for the majority of passes today that are still in pkpass format, this would massively increase the value of using PassAndroid over other closed-source apps that do give the right visual treatment to the various types of passes.

PS: thanks for open-sourcing PassAndroid, really a great reference!

neil-s avatar Nov 25 '18 21:11 neil-s

I suspect this issue is also the reason why export to the calendar usually yield a nondescript calendar event title like "Ticket for an Event" instead of "Patty Smith live", which it should be (you wish!) Voting up!!

opfeifer avatar Oct 16 '21 11:10 opfeifer