Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

TrivialDrive vs TrivialDrive V2?

Why are there two versions of TrivialDrive?

https://github.com/googlesamples/android-play-billing

Which version should be the main reference project for learning in-app billing? What's the difference between the versions?

like image 303
user8251758 Avatar asked Jul 04 '17 16:07

user8251758


2 Answers

TrivialDrive_v2 demonstrates a new way of integration with Google Play Billing.

It's based on the latest release of Play Billing library (currently 1.0) and tries to promote the best practices of integration with it.

TrivialDrive sample was kept for those that still use an integration via AIDL file (e.g. C++ developers).

like image 94
goRGon Avatar answered Sep 28 '22 04:09

goRGon


A little searching shows that Trival Drive V2 sample has a shared build.gradle file:

https://github.com/googlesamples/android-play-billing/blob/master/TrivialDrive_v2/shared-module/build.gradle

which has the following line:

compile 'com.android.billingclient:billing:dp-1'

Looking at the documentation here:

https://developer.android.com/google/play/billing/billing_library.html

Shows that Google just released a new version of the Billing Library release dp-1:

Starting with Play Billing Library release dp-1 (June 2017), the minimum supported API level is Android 2.2 (API level 8). The minimum supported In-app Billing API is version 3.

And specifically calls out changes to the minimum support Android API and In-app Billing API.

Given the Trivial Drive V2 sample app(s) has a Wear 2.0 example - this version has billing support on Wear 2.0 apps.

like image 24
Morrison Chang Avatar answered Sep 28 '22 04:09

Morrison Chang