PassAndroid icon indicating copy to clipboard operation
PassAndroid copied to clipboard

adding to calendar - which field(s)

Open clach04 opened this issue 6 years ago • 0 comments

Creating a issue

https://github.com/ligi/PassAndroid/blob/master/android/src/main/res/values/strings.xml#L123

You are about to add the expiration-date to the calendar - If you think there is a better date in this pass - please send it to me - PassAndroid needs to know where this

I'm not sure if there is one single better date :( Expiration would be a good default end date/time.

Linking #123

I have a pkpass file from Alaskan Air and there are three candidate fields to add to a calendar BUT sadly they are not full date-time (timestamped) fields. If possible the start time would be a good default (perhaps a user selection of date fields?).

date/time fields:

  • boardingPass.auxiliaryFields.departureDate - this appears to be in US format, and is date only. I do know know if this is common. I might start collecting pkpass files
  • boardingPass.backFields.departureTime - no timezone info (and need to match with departureDate
  • boardingPass.headerFields.boardingInfo - time only and also has some extra text

manually edited/formatted pass.json:

{
    "associatedStoreIdentifiers": [
        999999999999999999
    ], 
    "authenticationToken": "999999999999999999", 
    "backgroundColor": "rgb(245,245,245)", 
    "barcode": {
        "format": "PKBarcodeFormatAztec", 
        "message": "999999999999999999", 
        "messageEncoding": "iso-8859-1"
    }, 
    "barcodes": [
        {
            "format": "PKBarcodeFormatAztec", 
            "message": "999999999999999999", 
            "messageEncoding": "iso-8859-1"
        }
    ], 
    "boardingPass": {
        "auxiliaryFields": [
            {
                "key": "departureDate", 
                "label": "DATE", 
                "textAlignment": "PKTextAlignmentNatural", 
                "value": "12/12/19"
            }, 
            {
                "key": "flight", 
                "label": "FLIGHT", 
                "textAlignment": "PKTextAlignmentNatural", 
                "value": "999999999999999999"
            }, 
            {
                "key": "group", 
                "label": "Group", 
                "textAlignment": "PKTextAlignmentNatural", 
                "value": "999999999999999999"
            }, 
            {
                "changeMessage": "Your seat has changed to %@.", 
                "key": "seat", 
                "label": "SEAT", 
                "textAlignment": "PKTextAlignmentNatural", 
                "value": "999999999999999999"
            }
        ], 
        "backFields": [
            {
                "key": "departureTime", 
                "label": "DEPARTURE", 
                "textAlignment": "PKTextAlignmentLeft", 
                "value": "2:00AM"
            }, 
            {
                "key": "arrivalTime", 
                "label": "ARRIVAL", 
                "textAlignment": "PKTextAlignmentLeft", 
                "value": "3:00AM"
            }, 
            {
                "key": "duration", 
                "label": "DURATION", 
                "textAlignment": "PKTextAlignmentLeft", 
                "value": "999999999999999999"
            }, 
            {
                "key": "confirmationCode", 
                "label": "CONFIRMATION CODE", 
                "textAlignment": "PKTextAlignmentLeft", 
                "value": "999999999999999999"
            }, 
            {
                "key": "companyContact", 
                "label": "COMPANY CONTACT", 
                "textAlignment": "PKTextAlignmentLeft", 
                "value": "Alaska Airlines\r\nP.O. Box 68900\r\nSeattle, WA 98198\r\n1-800-252-7522\r\nwww.alaskaair.com "
            }
        ], 
        "headerFields": [
            {
                "key": "boardingInfo", 
                "label": "BOARDS @ GATE", 
                "textAlignment": "PKTextAlignmentNatural", 
                "value": "1:00AM @ --"
            }
        ], 
        "primaryFields": [
            {
                "key": "departureAirport", 
                "label": "999999999999999999", 
                "textAlignment": "PKTextAlignmentNatural", 
                "value": "999999999999999999"
            }, 
            {
                "key": "arrivalAirport", 
                "label": "999999999999999999", 
                "textAlignment": "PKTextAlignmentNatural", 
                "value": "999999999999999999"
            }
        ], 
        "secondaryFields": [
            {
                "key": "travelerName", 
                "label": "PASSENGER", 
                "textAlignment": "PKTextAlignmentNatural", 
                "value": "999999999999999999"
            }, 
            {
                "key": "loyaltyNumber", 
                "label": "MP#", 
                "textAlignment": "PKTextAlignmentNatural", 
                "value": "999999999999999999"
            }
        ], 
        "transitType": "PKTransitTypeAir"
    }, 
    "description": "Alaska Airlines Boarding Pass", 
    "expirationDate": "2019-12-13T00:00:12Z", 
    "foregroundColor": "rgb(1,66,106)", 
    "formatVersion": 1, 
    "labelColor": "rgb(60,59,63)", 
    "locations": [
        {
            "latitude": 999999999999999999.999999999999999999, 
            "longitude": 999999999999999999.999999999999999999, 
            "relevantText": "Tap to view boarding pass."
        }
    ], 
    "organizationName": "Alaska Airlines", 
    "passTypeIdentifier": "pass.wallet.urbanairship.com", 
    "serialNumber": "999999999999999999", 
    "sharingProhibited": false, 
    "teamIdentifier": "999999999999999999", 
    "webServiceURL": "https://wallet-api.urbanairship.com/apple"
}

clach04 avatar Dec 13 '19 17:12 clach04