CatimaLoyalty / Android

Catima, a Loyalty Card & Ticket Manager for Android
https://catima.app
GNU General Public License v3.0
748 stars 140 forks source link

Dealing with cards where the ID is not the same as the actual barcode #90

Closed TheLastProject closed 3 years ago

TheLastProject commented 3 years ago

Some cards will show a different ID than what is the actual barcode. Which means that manually adding the card instead of scanning won't work for these companies.

For example, German company Engelhorn: To test this, I created a new Engelhorn card in Stocard: Customer ID 123456 -> ITF barcode 7431234561 Customer ID 767946 -> ITF barcode 7437679465

We need some way to deal with this, probably together with https://github.com/TheLastProject/Catima/issues/89?

evelikov commented 3 years ago

Thanks for picking up the loyalty-card-locker and moving it forward.

Fwiw I would love to see such feature and starting simple - a way to add/show "Custom ID". Say perhaps an extra field when editing and an icon/indicator when being shown.

I'm slightly worried about building a database of companies and quirks. Both about scalability and being inflexible for less techy users. Ones that cannot submit a bugreport/MR - yet can press "custom ID" and write in in their app.

TheLastProject commented 3 years ago

Especially given #90's complexity, my plan is now as follows:

  1. Create a new database field called barcode value, defaulting to null
  2. If barcode value is null, generate the barcode based on the card ID. Otherwise, generate the barcode based on the barcode value.
  3. In the view screen, always show the card ID and barcode, but hide the "barcode value"
  4. In the edit screen, in the barcode tab, create a dropdown with the option to use the card ID or use another value (much like how expiry's flow currently works)
Korb commented 3 weeks ago

In the Catima 2.30.0 f-droid I currently have installed, I encountered non-obvious app behavior in a situation where the “Card ID” and “Barcode value” are different.

Sequence for reproducing

  1. In the list of cards, tap on the add new card button in the lower right corner of the screen.
  2. Scan the barcode by cam / from a file. In the Card ID field you will see the text encrypted in the barcode, in the Barcode value will be the value Same as ID.
  3. Copy the value of the Card ID to the clipboard.
  4. Change the Same as ID value to Set barcode value, insert the text from the clipboard (you want the barcode to remain the same as it was scanned and present on the card). Click OK.
  5. Change the value of the Card ID field to something else (the second text on the card, which is its second ID, not directly associated with the barcode).
  6. Click the checkmark in the lower right corner of the screen to save your changes.
  7. The notification Update barcode value? You changed the ID. Do you want to also update the barcode to use the same value? will appear. and the choice is No and Yes.

I don't understand why the application thinks that the barcode is generated based on the "Card ID" field value and not the "Barcode value" as it seems obvious. Perhaps the input field labels in the interface are mixed up?

TheLastProject commented 3 weeks ago

What you're talking about is already tracked in #1453.

(Also please don't comment on old closed issues, your comments will get lost in the void as the issue is considered solved already and I don't keep track of new comments in closed issues)