Publishing a release APK

Now that you have adjusted the setting needed to produce a release build, you are ready to publish the actual APK. When we say publish, we simply mean to produce an APK that can be uploaded to the Google Play Store. The following sections discuss the steps of producing a signed APK from within Xamarin Studio.

Keystores

A keystore is a database of security certificates created and managed by the keytool program from the Java SDK. You can create the keystore outside of Xamarin Studio using the keytool command or from within Xamarin Studio that provides a UI that interfaces with the keytool command. The next section takes you through the steps to publish an APK and create a new keystore from within Xamarin Studio.

Publishing from Xamarin.Android

The following steps guide you through the creation of a new keystore as a part of the process of creating a signed APK:

  1. In the Configuration drop-down box, select Release.
  2. Navigate to Project | Publish Android Application from the main menu; note the Keystore selection page of the Publish Android Application wizard, as shown in the following screenshot:

    Publishing from Xamarin.Android

  3. Select Create new keystore, select a location including a filename for the keystore, and enter the password and confirm it. The example keystore is in the project folder named NationalParks.keystore and the password is nationalparks.
  4. Select Forward; you will see the Key creation page of the Publish Android Application wizard, as shown in the following screenshot:

    Publishing from Xamarin.Android

  5. Enter all the relevant information. This example uses nationalparks for the Alias field and Password.
  6. Select Forward; you will see the Select destination page of the Publish Android Application wizard, as shown in the following screenshot:
    Publishing from Xamarin.Android
  7. Select the required Target directory option and click on Create. Xamarin Studio will compile the app for release and generate a signed APK file. You should see the following in the Publishing package pad:
    Publishing from Xamarin.Android

The resulting APK is ready for final testing and potential distribution. Be sure to secure and back up your keystore as it is critical to distributing future versions.

Republishing from Xamarin.Android

Subsequent publications of an app should always use the original keystore. To accomplish this, simply select Use existing keystore on the Keystore selection page of the Publish Android Application wizard.

Publishing from Visual Studio

Publishing a signed APK from within Visual Studio essentially follows the same process. To do so, simply navigate to Tools | Publish Android Application from the main menu.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.119.241