Publishing your app to the Google Play Store

Android apps are distributed through the Google Play Store. They can be made available to the general public or just to those within your organization. To publish your app, you will need a Google Play Store Developer account. If you don't already have one, sign up for one here.

Publishing your app involves signing it and then uploading it to the Google Play Store.

Signing your app

The Google Play Store requires that all Android apps be signed with a signing certificate. This process provides a uniform way for anyone to determine the author of an app.

You can sign all of your apps with a single certificate. If you are creating apps for other organizations, remember that the certificate indicates the author. If the organization for whom you are creating the app should be listed as the author, you should create a separate certificate for use when signing the apps you create for them.

These certificates are stored in a file called a keystore. You can store all of your certificates in a single keystore or create multiple keystore files. How you choose to organize them is completely up to you. If you only create apps that will be published by you, you will likely need only one certificate stored in a single keystore file.

To create a keystore file:

  1. Launch Android Studio.

  2. Choose Build > Generate Signed Bundle/APK. The Generate Signed Bundle/APK dialog box appears.

  3. In the Generate Signed Bundle/APK dialog box, choose the Android App Bundle option.

  4. Below the field for Key store path, click Create new. The New Key Store window appears.

  5. For the Key store path field, click the folder icon and select the location where you want your keystore file stored. You can move it later if you'd like.

  6. Choose a password and then confirm it.

  7. Enter an identifying name in the Alias field. If this certificate is for you, it would be sensible to put your name in this field. If you are certificate is for an app you are creating for another organization, put that organization's name in this field.

  8. Enter and confirm the Key password. This can be the same password you used earlier.

  9. Fill in the Certificate fields. The Country Code is a two-letter code (such as US).

  10. Click OK.

Important

You cannot use a comma in the Certificate fields. This will generate a "Failed to create keystore" error. You may encounter this with other punctuation characters as well.

  1. In the Generate Signed Bundle/APK dialog box, click Next.

  2. Choose release then click Create.

Note

The debug option is not needed as Xojo creates it automatically when you run your Android project from the IDE.

The keystore file has now been created as well as a file titled private_key.pepk. Both of these files will be required for signing your app.

Important

Your keystore file extension must be .jks in order for Xojo to sign your app.

In order to sign your application, Xojo will need to know which certificate in the keystore file to use. To do this, you'll need to create a text file that indicates the keystore password, the Key password, the name of the Key alias and the name of the keystore file itself. The text file contents should be in the following format:

storePassword=keyStorePassword
keyPassword=KeyPassword
keyAlias=KeyAlias
storeFile=KeyStoreFileName

For example, if the keystore password and key password were both mellon, the key alias was Gandalf and the keystore file name was MyKeys.jks, the text file contents would be:

storePassword=mellon
keyPassword=mellon
keyAlias=Gandalf
storeFile=MyKeys.jks

This file can be named anything you wish but it must be stored in the same folder/directory that contains your keystore file.

  1. To provide access to this file to Xojo so that it can sign your app after building it, in the Build Setting section of the Navigator, click on Android.

  2. In the Inspector, click on the ... button next to the Key Store Properties item. An open file dialog box appears.

  3. Select the text file you created.

When you build your app, Xojo will sign it with the certificate in your keystore file as designated in the keystore properties text file you created and provided to Xojo.

Uploading your app to the Google Play Store

To upload your app to the Google Play Store:

  1. Go to the Play Console.

  2. Create a record with details about your app.

  3. Upload your app.

  4. Make it available to beta testers only or release it if it's ready.

More details on how to upload your signed app to the Google Play Store can be found here.

If you are creating an app that should be available only to those within a particular organization, you will need to add that organization to your Google Play Store app settings. More information on how to do that can be found here.

Important

The Non Release Version number must be incremented with each bundle you want to upload to the Google Play Store.