O'Reilly logo

Xamarin Mobile Development for Android Cookbook by Matthew Leibowitz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Integrating in-app billing

When Google Play is set up to handle in-app billing, the app must first connect to the Google Play service before it can request product details and make purchases.

Getting ready

Before the app can connect to Google Play, we need to create an app listing on the Google Play Developer Console (http://play.google.com/apps/publish).

How to do it...

Our first requirement before adding in-app billing to our app is the app's public key from Google Play:

  1. We need to copy the Base64-encoded public key from the console under the app's Services & APIs section:
    How to do it...

    The public app license key

  2. Then, we paste that key into our app. For testing purposes, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required