Publishing your app via a URL

Android apps can be distributed and installed directly via a URL.

Publishing your app this way involves signing it and then uploading to a server so that you can provide the URL to end users for download.

Signing your app

Google 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 APK 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. This file 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.

  4. Make sure the Build for Google Play Store is off.

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.

The built app will have a .apk suffix. This is the file you will make available for download. The file ending in .idsig is unneeded.

Important

Do not compress your app or change the format in any way. The raw .apk file must be what the user downloads in order for it to be recognized by Android for installation.

Installing an app directly from a URL

To download and install an from a URL:

  1. Go to the Chrome browser on your Android device.

  2. Enter the URL that points to the .apk file.

  3. If this is the first time you've installed an app via Chrome, Android will ask you to give Chrome permission to do so.

  4. If you haven't installed apps from this developer before, you will likely get some warnings before you can install the app.

  5. Once the app is installed, you can launch it.