12

How do I get (or view) an Android app base 64 public key? I have the license file, and I have published my app before.

I need the key for licensing.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491
MontrealDevOne
  • 1,034
  • 3
  • 17
  • 30

4 Answers4

16

To find the public licensing key for your app perform the following steps...

1.) Login to the Google Play Developer console from where you published your app

2.) Click on your app in the list of apps

3.) Click on Developer Tools on the left menu

3.) Select Services & API's

4.) Under Licensing & In-App billing you will see the public key

Felipe Jun
  • 722
  • 11
  • 22
Greg Quinn
  • 1,927
  • 1
  • 23
  • 26
0

To add licensing to an application, you must obtain your publisher account's public key for licensing and copy it into your application. Here's how to find your account's public key for licensing:

Go to the Google Play publisher site and sign in. Make sure that you sign in to the account from which the application you are licensing is published (or will be published). In the account home page, locate the "Edit profile" link and click it. In the Edit Profile page, locate the "Licensing" pane, shown below. Your public key for licensing is given in the "Public key" text box.

Source http://developer.android.com/guide/google/play/licensing/adding-licensing.html

MontrealDevOne
  • 1,034
  • 3
  • 17
  • 30
0

Your base64 string is possibly an X509EncodedKeySpec. I can only guess. If so, you should base64 decode the string to obtain a byte []. Then construct an X509EncodedKeySpec from this byte []. Then create an instance of an RSA KeyFactory, and use the generatePublic() method of this KeyFactory to obtain a PublicKey. This public key can then be passed to Cipher.init()

Hardik Joshi
  • 9,477
  • 12
  • 61
  • 113
0

In Google Play Developer Console -> Your app -> Monetization setup -> in the bottom enter image description here

Yuliia Ashomok
  • 8,336
  • 2
  • 60
  • 69