1

I am trying to understand how does the google play billing library authenticate.

All the tutorials start with BillingClient but how does billing client know which account to connect how do I pass authentication credentials to it and more importantly where do I get those credentials.

I checked google play billing documentation before asking here and multiple other docs but everyone assumes the developer has the information magically without need to explain.

When I try to use the client without any credentials I just keep getting disconnection errors.

nikoss
  • 3,254
  • 2
  • 26
  • 40

1 Answers1

2

Google Play Billing library authenticates with your Google Play Application Id which is already defined in google-services.json or string variables on your android project. When you check on Google Play Console you will see there is no extra credentials and so you can retrieve in app purchase sku list by their own keys you defined of each product or subscription.

Er.Se
  • 461
  • 3
  • 11
  • How do i get those credentials ? the json file i mean or the string resource details – nikoss Jul 19 '20 at 11:36
  • here is detailed information: https://developers.google.com/android/guides/google-services-plugin – Er.Se Jul 19 '20 at 11:43
  • one thing I dont understand is that this does not mention anything about the billing library and billing library docs dont say anything about this plugin this is super confusing I still dont know where to get those values and how to connect then with billing library – nikoss Jul 19 '20 at 11:47
  • ok. It is checked in backstage because google already have this. I mean that anybody set up a Google Play Developer Account and then link a Google Play developer account to their payments profile. Otherwise you cannot use in app purchase. When you read this you will get the point. https://developer.android.com/google/play/billing/getting-ready#account – Er.Se Jul 19 '20 at 12:13
  • I've been reading that for a week already it doesnt work I keep getting error messages saying service connection is disconnected from the library the link you shared doesnt explain a single thing about the auth process – nikoss Jul 20 '20 at 17:25