Image for post
Image for post

Announcing the Android SDK + Lyft Button

Today, we are very excited to announce the release of the official Lyft Android SDK. We’ve developed the SDK with the goal of making it easy for Android developers to integrate with Lyft. Using less than 20 lines of code, you can leverage the Lyft Button — which surfaces cost and ETA of a ride and deeplinks a user into the Lyft app (while earning revenue for every new user your app brings to Lyft). Or, if you prefer to build a more deeper integration, you can leverage the SDK’s modular design to make API calls directly and build your own custom experience.

Image for post
Image for post
Lyft Button deeplink in action

Lyft Button
The SDK comes packaged with a stylized Lyft Button that you can include in your app with just a few lines of code. The button gives you flexibility to display the cost and ETA of a ride, as well as programmatically set the ride type, pickup, and destination locations. All of this gives your users a Lyft ride with a tap of a button by deeplinking directly to Lyft. If the Lyft app is not installed on the device, the user is automatically taken to the Play Store to download it.

The Lyft Button comes in 5 styles:

Image for post
Image for post

Lyft API Wrapper
If a deeper integration with Lyft is what you’re after, the SDK provides wrapper methods of all of our public APIs that don’t require a Lyft user to authenticate (such as cost, ETA, and ride types). This gives you flexibility in building a more custom experience for your users. Under the hood, the networking module of the SDK is a Java-only gradle module that exposes Lyft API wrapper methods and provides POJO responses. Requests can be done either synchronously or asynchronously. If you’re a fan of RxJava, the API wrappers return Observables as well.

Sample Apps
There are 2 sample Activities included in the SDK to help you get started.

The SDK is now open-sourced on Github. We welcome all feature requests! In the near future we’ll extend our SDK offering to include iOS. We’re also building out more products for our developers, so stay tuned.

Looking forward to seeing what you’ll build!

Written by

Android Engineer @ Lyft

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store