61

We do not use any Google Play Developer APIs explicitly, yet we are receiving the following warning:

enter image description here

Is this related to https://developer.android.com/google/play/billing/billing_library_releases_notes ?

We are currently using Google Play Billing Library 1.2.2 Release (2019-03-07)

We don't plan to migrate Google Play Billing Library 2.0.1 Release (2019-06-06) because it would be a lot of work with little gain.

Purchases must be acknowledged within three days

But that is just my wild guess - that the Google Play Billing library is related to the Google Play Developer API. They may or may not be related to each other.

What does it mean by "We’ve detected that your app is using an old version of the Google Play developer API" ?

The following is the full set of our dependencies. Any idea what causes this warning?

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])


    implementation 'com.android.billingclient:billing:1.2.2'


    implementation 'androidx.multidex:multidex:2.0.1'


    def lifecycle_version = '2.0.0-beta01'
    // ViewModel and LiveData
    implementation "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"


    // alternately - if using Java8, use the following instead of compiler
    implementation "androidx.lifecycle:lifecycle-common-java8:$lifecycle_version"


    def room_version = '2.1.0'
    implementation "androidx.room:room-runtime:$room_version"
    annotationProcessor "androidx.room:room-compiler:$room_version"

    def work_version = "2.1.0"
    implementation "androidx.work:work-runtime:$work_version"

    // https://github.com/yccheok/SmoothProgressBar
    implementation 'com.github.castorflex.smoothprogressbar:library:1.1.0'

    // For Google Drive REST API - https://github.com/gsuitedevs/android-samples/blob/master/drive/deprecation/app/build.gradle
    implementation('com.google.http-client:google-http-client-gson:1.26.0') {
        exclude group: 'org.apache.httpcomponents'
    }
    implementation('com.google.api-client:google-api-client-android:1.26.0') {
        exclude group: 'org.apache.httpcomponents'
    }
    implementation('com.google.apis:google-api-services-drive:v3-rev136-1.25.0') {
        exclude group: 'org.apache.httpcomponents'
    }

    implementation 'com.google.firebase:firebase-messaging:19.0.1'

    implementation 'com.google.android.gms:play-services-auth:17.0.0'

    implementation 'androidx.appcompat:appcompat:1.1.0-beta01'
    implementation 'androidx.preference:preference:1.1.0-beta01'
    implementation 'com.google.android.material:material:1.1.0-alpha07'

    implementation 'androidx.exifinterface:exifinterface:1.0.0'
    implementation 'androidx.gridlayout:gridlayout:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.google.code.gson:gson:2.8.5'

    implementation 'com.github.yccheok:AndroidDraw:0.18'
    implementation 'com.github.yccheok:SectionedRecyclerViewAdapter:0.4'
    implementation 'com.github.yccheok:CalendarView:1.10'

    implementation 'com.andrognito.patternlockview:patternlockview:1.0.0'

    implementation 'com.github.bumptech.glide:glide:4.7.1'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.7.1'

    implementation 'com.github.yccheok:PhotoView:0.1'

    implementation 'com.github.yccheok:Matisse:1.6'

    implementation 'com.jakewharton.threetenabp:threetenabp:1.1.1'

    // https://github.com/romandanylyk/PageIndicatorView
    implementation 'com.romandanylyk:pageindicatorview:1.0.2@aar'

    implementation 'me.zhanghai.android.materialratingbar:library:1.3.2'

    testImplementation 'junit:junit:4.12'

    testImplementation "org.robolectric:robolectric:4.2.1"
    testImplementation 'org.mockito:mockito-core:2.23.0'
    testImplementation 'org.powermock:powermock-core:2.0.0-RC.4'
    testImplementation 'org.powermock:powermock-module-junit4:2.0.0-RC.4'
    testImplementation 'org.powermock:powermock-api-mockito2:2.0.0-RC.4'

    androidTestImplementation 'androidx.test:runner:1.3.0-alpha01'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0-alpha01'
}

For project level dependencies, it is

dependencies {
    classpath 'com.android.tools.build:gradle:3.4.2'
    classpath 'com.google.gms:google-services:4.2.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
4
  • Google Play Billing library might be related to Google Play Developer API I think you're right
    – dasfima
    Jun 29, 2019 at 23:30
  • which library are you using at the backend to validate the purchases? Jul 24, 2019 at 9:39
  • Looks like your Google Drive related libraries are using API that's deprecated. Visit this page : github.com/gsuitedevs/android-samples/tree/master/drive/… Aug 3, 2019 at 5:29
  • @JeelVankhede com.google.apis:google-api-services-drive:v3-rev136-1.25.0 He is already using v3 Drive API, and error specifically mentioned Developer API Aug 3, 2019 at 19:57

5 Answers 5

22

The problem is that your project on Google Cloud Platform is using an old version of Developer Web API. It was automatically set up for you when you enabled developer services intentionally/unintentionally from Google Play Console's API Access section in Developer Settings.

Web API for subscriptions and purchases is actually part of Android Developer API:

The Google Play Developer API allows you to perform a number of publishing and app-management tasks. It includes two components:

The Subscriptions and In-App Purchases API lets you manage in-app purchases and subscriptions.
The Publishing API lets you upload and publish apps, and perform other publishing-related tasks.

You are not using above API in your app, this API is for management not the actual purchases. You are using SDK which has different versioning so no need to upgrade. This API was set up in your GCP project however.

To find which Project on GCP is associated with your Play Console, go to this link: https://play.google.com/apps/publish/#ApiAccessPlace

enter image description here

You just need to Go to GCP, find your project, find Google Android Developer API and change the version there. Or you can just disable the API if you don't use it.

For example, my GCP project was automatically named Google Play Android Developer so yours might probably be the same.

I can't see an option on my console probably because they removed it for new projects, but if your project is already using an old version, you probably will have a warning there as well.

enter image description here

5
  • 1
    Could you explain a bit how to change the version after finding the API? Aug 22, 2019 at 15:28
  • 3
    @MaximeTremblay-Savard if there is no option to migrate, then unlink from play store, delete project on google cloud and link it again to anew project. Aug 22, 2019 at 17:50
  • What happens when the project is unlinked? Why is the project there in the first place?
    – Manuel
    Nov 17, 2019 at 4:02
  • 1
    @Manuel you won't be able to use those two APIs if you unlink project, if you are not using them already, it won't make a difference. Basically you have to create a GCP project and then link it to your console project to use those two APIs Nov 17, 2019 at 6:58
  • 2
    Thanks I was wondering why the project exists in the first place, but I discovered that it is the fastlane integration.
    – Manuel
    Nov 17, 2019 at 11:57
16
+250

Any one have idea, what does it mean by "We’ve detected that your app is using an old version of the Google Play developer API" ?

The simple explanation for this message is that: An app either yours or a third party app is hitting the below api

https://www.googleapis.com/androidpublisher/v1/applications

or

https://www.googleapis.com/androidpublisher/v2/applications

passing your app's package name along

com.android.myapp

in other to perform automated tasks like

Retrieve billing Info
Publish app to store
Retrieve review comments
etc..

Nevertheless those apis are deprecated an they're meant to go through the below api instead

https://www.googleapis.com/androidpublisher/v3/applications

Some third-party plugins have been confirmed to trigger this message, simply because they are using deprecated apis to perform their actions.

For example:

There is also a possibility that you are the one referencing the deprecated api maybe from your server side or "just maybe" in your own app code. The bottom line is that a call somewhere is hitting a deprecated api with your app's package name. An advice from me to you would be: Update your billing library if you use one.

Wrapping this up with the statement from Google Developer API v3 doc

Usage of the API can also be indirect, not by the app itself, but by a third-party plugin (e.g. a plugin for rolling out new releases). Many third-party plugins are already using version 3 of the API. If you use a plugin that does not support version 3, you will need to contact the maintainer.

3
  • 2
    I have same problem as OP and I only use google support libraries as dependencies (nothing else, no 3rd party libs or jars). Also I dont use any API nor API keys, no remote servers communication, no in-app payment, and my app works offline so no internet access. And I still got warning, why? I dont think thats possible, it must be false warning
    – qkx
    Aug 7, 2019 at 6:25
  • 1
    I can validate that it is not my plugin library at all for In App Billing. This is usually due to receipt validation servers or other extensions using older APIs. Oct 4, 2019 at 20:12
  • I guarantee neither my app nor any other using my app's name is hitting this API. So not only does this answer not even suggest a solution (meaning it shouldn't be an answer), it's not even correct. Nov 11, 2021 at 22:12
4

This isn't related to billing since you don't have server side validation. It's the AndroidPublisher API as other have mentioned, which means you probably have a pretty nasty security flaw. So, how to go about finding it?

  1. Go to https://play.google.com/apps/publish/#AdminPlace
  2. In there, you'll see a list of "Users with access." Some will be real, others will be Service Accounts. The latter end in @gcp-project-id.iam.gserviceaccount.com
  3. If there's anything you don't recognize, remove the account
  4. If you want to further clean things up, go to https://console.developers.google.com/apis/credentials?project=gcp-project-id with the gcp-project-id from above
    1. Don't remove random service accounts here, most are auto generated from various other Google service and things will break if they disappear. Do remove the service accounts that had access to the Play Console if they aren't used to access other APIs.
1
  • I don't have a "Users with access" section.Do I have to do anything?
    – Zima
    Nov 26, 2019 at 6:37
1

Google Play Developer API is not directly used inside your app (APK), so you cannot fix it in build.gradle. It contains some services to help you automate app publishing (Continuous integration, CI) and also an API to validate in-app purchases.

You should check how your backend is validating in-app purchases and update to the latest version. You may also check how your CI server is uploading the APK to the Play Store and also update to the latest version.

You can read more about Google Play Developer API here https://developers.google.com/android-publisher/

1
  • 3
    We do have have any backend to validate in-app purchase. We also do not have any CI server. Jul 29, 2019 at 16:50
0

According to google documentation, you cannot use Google play developer version 1 and 2 as in documentation, they have mentioned that they are migrating to Version 3 and In-app billing is directly linked to this.

Check first link to read it
1. https://android-developers.googleblog.com/2019/03/changes-to-google-play-developer-api.html

To know about Google Play Developer API
Check https://developers.google.com/android-publisher/

For implementing Version 3
1. https://github.com/googlesamples/android-play-publisher-api/tree/master/v3/java
2. https://developers.google.com/api-client-library/java/apis/androidpublisher/v3

Hope this will help you.

2
  • 1
    Well yes, the OP seems to know that and claims to not directly use the SDK. The question was: how do you find out what is causing this notice then
    – avalancha
    Aug 1, 2019 at 15:16
  • 2
    There is no easy way to find what's causing it, the blog clearly says that the warning can also exist because "Usage of the API can also be indirect, not by the app itself, but by a third-party plugin". Apparently, the OP is using lots of libraries. "The message is based on all calls to the API in the last seven days and is refreshed daily".
    – Taseer
    Aug 3, 2019 at 11:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.