Skip to content
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

FR: Parsing field types #220

Open
neil-s opened this issue Nov 25, 2018 · 1 comment
Open

FR: Parsing field types #220

neil-s opened this issue Nov 25, 2018 · 1 comment

Comments

@neil-s
Copy link

neil-s commented Nov 25, 2018

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!

@opfeifer
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants