简体   繁体   中英

Does in-app billing require Google Play services to be installed on the user's device?

The setup docs for in-app billing show you need to add the in-app billing library to your Android project. Presumably that calls Google Play's servers to query and make in-app purchases on your app's behalf.

The setup docs for using Google Play APIs don't mention in-app billing; whereas you would have to add a dependency on Google Play if you wanted to display ads or use Google Analytics for example.

So, taking these 2 pieces of info together, does this mean your app does not need Google Play services to be present on the user's device for your app to use in-app billing successfully? I suspect the answer's "No, you don't need Google Play services to be installed", but it would be good to have confirmation of this.

The user's device must have a Google Play Service in order to use in-App Billing.

Your application accesses the In-app Billing service using an API that is exposed by the Google Play app that is installed on the device. The Google Play app then conveys billing requests and responses between your application and the Google Play server. In practice, your application never directly communicates with the Google Play server. Instead, your application sends billing requests to the Google Play app over interprocess communication (IPC) and receives responses from the Google Play app. Your application does not manage any network connections between itself and the Google Play server.

In-app Billing Version 3 is the latest version, and it maintains very broad compatibility across the range of Android devices. In-app Billing Version 3 is supported on devices running Android 2.2 (API level 8) or higher that have the latest version of the Google Play app installed (a vast majority of active devices).

You might also want to check theIn-app Billing Version Notes :

The In-app Billing API is versioned, with each version offering additional features to your app. API support is provided by the Google Play Store app. On most devices, the Google Play Store app is updated automatically to support newer versions of the API.

Hope this helps!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM