Tag Archives: Transit

Introducing the Google Wallet API

Posted by Petra Cross, Engineer, Google Wallet and Jose Ugia, Google Developer Relations Engineer

Google Pay API for Passes is now called Google Wallet API

Formerly known as Google Pay API for Passes, the Google Wallet API lets you digitize everything from boarding passes to loyalty programs, and engage your customers with notifications and real-time updates.

New features in Google Wallet API

Support for Generic Pass Type

The Google Pay API for Passes supported 7 types of passes: offers, loyalty cards, gift cards, event tickets, boarding passes, transit tickets and vaccine cards. But what if you want to issue passes or cards that do not fit into any of these categories, such as membership cards, or insurance cards?

We are thrilled to announce support for generic passes to the Google Wallet API so you can customize your pass objects to adapt to your program characteristics. The options are endless. If it is a card and has some text, a barcode or a QR code, it can be saved as a generic card.

You now have the flexibility to control the look and design of the card itself, by providing a card template that can contain up to 3 rows with 1-3 fields per row. You can also configure a number of attributes such as the barcode, QR code, or a hero image. Check out our documentation to learn more about how to create generic passes.

While generic passes can be used to mimic the appearance of any existing supported pass type (such as a loyalty card), we recommend you to continue to use specialized pass types when available. For example, when you use the boarding pass type for boarding passes your users receive flight delay notifications.

Grouping passes and mixing pass types

With the new Google Wallet API, you can also group passes to offer a better experience to your users when multiple passes are needed. For example, you can group the entry ticket, a parking pass, and food vouchers for a concert.

In your user’s list of passes, your users see a pass tile with a badge showing the number of items in the group. When they tap on this tile, a carousel with all passes appears, allowing them to easily swipe between all passes in the group.


Here is an example JSON Web Token payload showing one offer and one event ticket, mixed together and sharing the same groupingId. Later, if you need to add or remove passes to/from the group, you can use the REST API to update the grouping information.

{

  "iss""OWNER_EMAIL_ADDRESS",

  "aud""google",

  "typ""savetowallet",

  "iat""UNIX_TIME",

  "origins": [],

  "payload": {

    "offerObjects": [

      {

        "classId""YOUR_ISSUER_ID.OFFER_CLASS_ID",

        "id""YOUR_ISSUER_ID.OFFER_ID",

        "groupingInfo": {

          "groupingId""groupId1",

          "sortIndex"2

        }

      }

    ],

    "eventTicketObjects": [

      {

        "classId""YOUR_ISSUER_ID.EVENT_CLASS_ID",

        "id""YOUR_ISSUER_ID.EVENT_ID",

        "groupingInfo": {

          "groupingId""groupId1",

          "sortIndex"1

        }

      }

    ] 

  }

}


A note about Google Pay API for Passes:

Although we are introducing the Google Wallet API, all existing developer integrations with the previous Google Pay Passes API will continue to work. When the Google Wallet app is launched in just a few weeks, make sure to use the new “Add to Google Wallet” button in the updated button guidelines.

We’re really excited to build a great digital wallet experience with you, and can’t wait to see how you use the Google Wallet API to enhance your user experience.

Learn more

Simpler Google Wallet integration for Android developers

Posted by Petra Cross, Engineer, Google Wallet and Jose Ugia, Google Developer Relations Engineer

Today more than ever, consumers expect to be able to digitize their physical wallet, from payments and loyalty to tickets and IDs. At Google I/O we announced Google Wallet, which allows users to do exactly that. Consumers can securely store and manage their payment and loyalty cards, board a flight, access a gym and much more, all with just their Android phone.

For Android developers, who manage their own digital passes, Google Wallet offers a fast and secure entry point, especially when quick access is needed. Google Wallet will be quickly accessible from the device lock screen on Pixel devices and from the pulldown shade. Your users will be able to quickly access their passes when they need them - all in one place.

Integrating with Google Wallet became even easier and more flexible. We’ve summarized the news of what you can expect as an Android developer.

New Android SDK

The existing Android SDK supports saving three types of passes: offers, loyalty cards, and gift cards. You asked us to add support for other pass types, and we’ve heard you. Today, we are announcing a new, more extensible API and Android SDK, that in addition to tickets, boarding passes, and transit tickets, and additional pass types, includes support for the new generic pass, which lets your users store any pass or card to Google Wallet. The Android SDK lets you create passes using JSON or JSON Web Token as a payload without a backend integration.

Using the Android SDK is straightforward. First, you create a payload with information about the pass. You can either build it directly in your Android app, or retrieve it from your backend stack. Then, you call the savePasses or savePassesJwt method in the "PayClient" to add the pass to Google Wallet.

Here is how you define and save a sample generic pass object:

{

  "id""ISSUER_ID.OBJECT_ID",

  "classId""CLASS_ID",

  "genericType""GENERIC_TYPE_UNSPECIFIED",

  "cardTitle": {

    "defaultValue": {

      "language""en",

      "value""Your Program Name"

    }

  },

  "header": {

    "defaultValue": {

      "language""en",

      "value""Alex McJacobs"

    }

  }

}


private val addToGoogleWalletRequestCode = 1000

private val walletClientPayClient = Pay.getClient(application)

private val jwtString = "" // Fetch a previously created JWT with pass data

walletClient.savePassesJwt(jwtString, thisaddToGoogleWalletRequestCode)

Once your app calls savePassesJwt, the process guides your users through the flow of adding a pass to Google Wallet, and allows them to preview the pass before confirming the save operation.

Developer documentation, samples and codelabs

You can find the new Wallet API documentation on developers.google.com/wallet. We customized our developer guides for each pass type to make all the information easily accessible for your specific needs. You will also find plenty of code samples demonstrating how to check for availability of the Google Wallet API on the Android device, how to handle errors, and how to add the “Add to Google Wallet” button to your app.

Don’t forget to play with our interactive passes visual demo, which lets you fill in the fields and create your own custom pass prototype without writing a single line of code. The tool also generates code samples that you can use to build this pass’ data structures which we call “classes” and “objects”.

We’re really excited to build a great digital wallet experience with you, and can’t wait to see how you use the Google Wallet API to enrich your customer experience. Take a look at our hands-on workshop "Digitize any wallet object with the Google Wallet API" to see a full integration tutorial on Android.

Learn more

Stay informed about local bus and long-distance train schedules, now on Google Maps

https://lh6.googleusercontent.com/zvHioNrFyqyMvE_Nso9DDiPkRsvSC4K_uLdUsoEiigp6MAIGaVGrqhYv5iCs1-nT_mfWHq6jxd7sKAJFwbr0N0mawPVVkf0fEhe5W_EZpEzhIeGqpoy7IhPiK_YOlHdut8922tDV
From a college student hopping onto a bus, to a family on vacation boarding a train journey to the serene beaches of Goa, public transport is the lifeblood of millions of Indians. And Google Maps is being used by over a billion travelers to navigate and explore their world, wherever they are. Beyond providing the ability to simply navigate between places, we have focused on building India-first features for Google Maps, to deliver a more relevant, accurate, and reliable experience.
Today we are happy to announce three more features to Google Maps in India, to make public transport  journeys more efficient and seamless: Bus travel times from live traffic in 10 of the largest cities in India, live train status for Indian Railways trains, and mixed-mode commute suggestions that now combine auto-rickshaw and public transport.


Simplifying travel on public transport buses
Google Maps can now tell you about your bus travel times based on live traffic. This uses the power of Google’s live traffic data and public bus schedules to calculate delays and provide accurate travel times. This is the first product of its kind -- launching first in India -- enabling you to know how long your bus trip will take when factoring in live traffic conditions. This feature is launching in Delhi, Bangalore, Mumbai, Hyderabad, Pune, Lucknow, Chennai, Mysore, Coimbatore, and Surat.




To use this feature, enter your starting location and destination, then tap the transit tab. The results for bus travel times from live traffic will include the time in green (when running on time) or red (when delayed.)


Real-time train information for long-distance trains
Google Maps can now help you know when your train will arrive by indicating the real-time status. Search for your starting location and destination, or your starting station and destination to see a list of trains that you can take between the routes. From there, you can easily see the real-time status, and whether any of them are delayed, right inside Google Maps. This feature was developed in partnership with the Where is My Train app that Google acquired last year.


Mixed-mode directions results that include auto-rickshaws
We’re excited to announce directions support in Maps for journeys that combine auto-rickshaw and public transport. The public transport tab on Google Maps for Android will now tell you when taking such a journey is a good option, how long it will take, which station you should take an auto-rickshaw to/from. You can also see the rickshaw meter estimate, and departure times for your transit connection. This feature will be available for Delhi and Bangalore initially and will soon be extended to more cities.



Posted by Taylah Hasaballah, Product Manager, Google Maps

Maps Minutes Hack #9: Get home quickly and safely on New Year’s Eve

Part of our series on how to save time this holiday season with Google Maps.

Whether you’re heading to a friend’s house for a cozy gathering, going to watch the ball drop in Times Square or attending an extravagant masquerade ball, the last thing you want to worry about on New Year’s Eve is driving.

With the Google Maps app, you can get where you’re going without ever getting behind the wheel. Earlier this year we launched a new feature that allows you to see various transportation options and compare travel times–all on one screen.

Once you enter your destination in the Google Maps app, you’ll see four options to get there: driving, walking, biking or transit (bus/train). You can quickly compare ETAs and switch between the transportation modes for more details and up-to-date information for each option.



If you’re heading to a casual celebration not so far from home, walking or public transit might be your best option. The Google Maps app will give your walk time ETA along with a few transit route options with real-time schedules, updates and fares.



Google Maps can also help you grab an Uber, if arriving by bus or train isn’t your holiday style. You can see the estimated trip duration, pickup time and estimated cost once you scroll down to the bottom of the app's transit option screen.

Stay safe with Maps Minutes Hacks and enjoy your New Year’s celebrations wherever they take you.

Posted by Dai Pham, Head of Geo and Google Maps Marketing

Source: Google LatLong


Maps Minutes Hack #5: Make your holiday detours easier with Google Maps

Part of our series on how to save time this holiday season with Google Maps.

Forget the eggnog for a holiday party? On the road to grandma's and need to gas up along the way? Or maybe you need to pick up a last-minute gift on the way to your in-laws’ house?

One poorly planned pit stop can add a lot of time to your trip – especially during the holidays when crowds can be bigger and traffic heavier. The good news is that Google Maps can help you make quick pit stops without long detours.

On Google Maps for Android, you can now search for places like a gas station, grocery store or coffee shop, navigate there, and then pick back up on your original route—all without leaving navigation mode (coming soon to iOS).



Here’s how it works: When you’re in navigation mode, simply tap the magnifying glass at the top right corner in the app. Pick a category from the drop down menu and you'll see a few options, along with ratings of businesses, prices at gas stations, and how much time the detour will add to your trip. Once you choose a place, the stop is automatically incorporated into your route. Can’t type and tap while driving? You can use voice commands instead.



Every minute counts. Save more time with Google Maps hacks. Next up: turn-by-turn navigation even when you’re offline.

Posted by Dai Pham, Head of Geo and Google Maps Marketing

Source: Google LatLong