Skip to content

Instantly share code, notes, and snippets.

@henriquemenezes
Last active May 31, 2016 01:03
Show Gist options
  • Save henriquemenezes/a5af67b7a85845009ce51b8c158a7b9b to your computer and use it in GitHub Desktop.
Save henriquemenezes/a5af67b7a85845009ce51b8c158a7b9b to your computer and use it in GitHub Desktop.
Android Publish

Android - Publish Your App

Preparing Your Application for Release

Configuring your application for release

  • At a minimum you need to remove Log calls and remove the android:debuggable attribute from your manifest file.
  • You should also provide values for the android:versionCode and android:versionName attributes, which are located in the <manifest> element.
  • Building and signing a release version of your application.
  • Testing the release version of your application.
  • Updating application resources for release.
  • Preparing remote servers and services that your application depends on.

Releasing Your Application to Users

  • Releasing through an App Marketplace
  • Releasing your application through email
  • Releasing through a web site
  • User Opt-In for Apps from Unknown Sources

Prepare for Release

Gathering Materials and Resources

  • Cryptographic keys
  • Application Icon
  • End-user License Agreement
  • Miscellaneous Materials

Configuring Your Application for Release

  • Choose a good package name
  • Turn off logging and debugging
  • Clean up your project directories
  • Review and update your manifest and Gradle build settings
    • <uses-permission> element
    • android:icon and android:label attributes
    • android:versionCode and android:versionName attributes

Address compatibility issues

  • Add support for multiple screen configurations
  • Optimize your application for Android tablet devices
  • Consider using the Support Library

Update URLs for servers and services

Implement Licensing (if you are releasing on Google Play)

Building Your Application for Release

  • Building with Android Studio

Preparing External Servers and Resources

Testing Your Application for Release

Versioning

Setting Application Version

  • android:versionCode — An integer value that represents the version of the application code, relative to other versions.
    • You can set the value to any integer you want, however you should make sure that each successive release of your application uses a greater value.
    • The android:versionCode value does not necessarily have a strong resemblance to the application release version that is visible to the user.
    • The greatest possible value for android:versionCode is MAXINT (2147483647). However, if you upload an app with this value, your app can't ever be updated.
  • android:versionName — A string value that represents the release version of the application code, as it should be shown to users.
    • The value is a string so that you can describe the application version as a <major>.<minor>.<point> string, or as any other type of absolute or relative version identifier.

You define both of these version attributes in the <manifest> element of the manifest file or the Gradle build file.

Semantic Versioning:

MAJOR - Make incompatible API changes MINOR - Add functionality in backwards-compatible manner PATCH - Make backwards-compatible bug fixes

Pre-Releases

Example:

  • 1.0.0-SNAPSHOT - development phase or pre-alpha or nightly builds
  • 1.0.0-alpha - developers generally test the software using white-box techniques
  • 1.0.0-a
  • 1.0.0-alpha.1
  • 1.0.0-a1
  • 1.0.0-beta - beta phase generally begins when the software is feature complete but likely to contain a number of known or unknown bugs. The first time that the software is available outside of the organization that developed it.
  • 1.0.0-b
  • 1.0.0-beta.1
  • 1.0.0-b1
  • 1.0.0-rc - is a beta version with potential to be a final product, which is ready to release unless significant bugs emerge.
  • 1.0.0-rc.1
  • 1.0.0 - Once released, the software is generally known as a "stable release".

NOTE:

  • If you use the Google Play Alpha/Beta Testing program take into account that it’s not a good idea to upload an APK with a version name ending in “alpha” or “beta”.
  • The reason is that when you promote an APK to production, you are not able to change the version name, so your users are going to believe they have installed a non stable version.

versionCode

  • 1.0.0-SNAPSHOT - 01 00 00 00
  • 1.0.0-RC* - 01 00 00 01 ... 01 00 00 98
  • 1.0.0 - 01 00 00 99

The simplest thing to do is start your initial development release at 0.1.0 and then increment the minor version for each subsequent release.

Specifying Your Application's System API Requirements

  • android:minSdkVersion — The minimum version of the Android platform on which the application will run, specified by the platform's API Level identifier.
  • android:targetSdkVersion — Specifies the API Level on which the application is designed to run. In some cases, this allows the application to use manifest elements or behaviors defined in the target API Level, rather than being restricted to using only those defined for the minimum API Level.
  • android:maxSdkVersion — The maximum version of the Android platform on which the application is designed to run, specified by the platform's API Level identifier. Important: Please read the documentation before using this attribute.

Sign Your App

References

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment