DbTradeAlert for Android – Enter the Play Store

First post in this series: Introduction to DbTradeAlert

Previous post: Add Backup


There are three prerequisites to distribute your app to millions with Google’s Play Store:

  1. Create a Google account
  2. Register for a publisher account – and pay a USD 25 developer registration fee
  3. Upload your app
App in Play Store

App in Play Store

Some tips to make life easier when following this post:

  • This post focuses on just publishing an app. You may want to add things like Firebase Analytics or AdMob before that which will be covered in later posts.
  • If you don’t like to be tracked by Google don’t use your normal browser to interact with the Play Store where you have to log in.
  • Do use a password manager like KeePass because you’ll have to come up with and store 3 new very important passwords.
  • You’ll need Internet access for quite a few of the following steps.

1. Create a Google Account

To create a Google account go to https://play.google.com/apps/publish/ and create one. You’ll need to specify:

  • First and last name
  • Password
  • Date of birth – depending on the services you use you’ll need to be at least 18 years old
  • Gender
  • Country

Your username is created from the email address you specify – either an existing one or a new gmail.com address. You don’t need to specify a phone number or an existing email address.

If you didn’t use a Gmail address for signing up you’ll get a verification mail after filling out the form. Click the link in that mail to finish creating your Google account.

2. Register for a Publisher Account

If you created a Google account in the previous section you’ll already be logged into the Google Play Developer Console. Otherwise go to https://play.google.com/apps/publish/ and log in with your Google account. In any case your Google account will be extended to a publisher acccount so you don’t have to juggle two accounts.

The first step in the Google Play Developer Console is to accept the Developer Distribution Agreement. The next step is to pay a USD 25 developer registration fee which will also attach a credit card to your account. Be aware that an additional charge for abroad payments may apply – 1.75 % in my case. The payment also doesn’t include VAT.

3. Publish Your App

The Play Store requires a signed release build of each app – debug builds must not apply.

3.1 Sign Your Release Build

Signing a build adds a certificate to the app so nobody can tamper with it. It also ensures only the original publisher can update an app. That in turn means that even you cannot update your app if you lose the key or the certificate expires. Changing a password is no problem though – keytool on the command line will do that.

To create a signed release build of the app:

  1. In Android Studio click Build | Generate Signed APK
  2. In the Generate Signed APK window:
    1. If you already have a keystore specify it in the Key store path field
    2. Otherwise click Create new and in the New Key Store window:
      1. Specify the path to create a new .jks file – this needs to stay private so don’t add it to the project directory / VCS if others have access to that
      2. Enter a strong password for the key store – again store it somewhere secure
      3. Enter an alias for the key store’s first key – for example Key like “DbTradeAlertKey” if you want to use app specific keys
      4. Enter a strong password for the first key – again store it somewhere secure
      5. Chose a validity – 25 years should be fine
      6. Fill in the cerificate fields – many are not mandatory though; I just entered initial, last name, country code
      7. Click OK – the New Key Store window closes
    3. The Generate Signed APK window’s Key alias and password fields will be filled automatically
    4. Click Next
    5. The Generate Signed APK window’s next step shows the apk’s path and that it will be a release build
    6. Click Finish

The output path – C:\Users\Admin\Documents\AndroidStudioProjects\DbTradeAlert\app in my case – will now contain a file named “app-release.apk”. Not very descriptive so let’s change it.

3.2 Change the APK Name

Changing the name of the APK (Android application package) is not required as only the applicationId – “de.dbremes.dbtradealert” in this case – needs to be unique. To avoid confusion it’s still a good idea to have unique APK names.

Open “app/build.gradle (Module: app)” – note that there is also “build.gradle (Project: DbTradeAlert)” – in Android Studio and add one line:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

    defaultConfig {
        applicationId "de.dbremes.dbtradealert"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        archivesBaseName = "${parent.name}-${android.defaultConfig.versionName}"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
// ...

After applying the changes click Sync now in the top right corner.

This will produce an APK named “DbTradeAlert-1.0-release.apk”. Before that archivesBaseName defaulted to “app” because that’s the name of the module Gradle builds. “app” is now replaced by the parent project’s name “DbTradeAlert” and the versionName “1.0”.

Some notes about the various names:

  • APK name: doesn’t show up anywhere but in your file system
  • AndroidManifest.xml:
    • application’s label attribute: determines the app’s name in settings
    • activity’s label attribute: determines the app’s name in launcher
    • intent-filter’s label attribute: overrides the activity’s label attribute
  • The name you’ll specify when uploading to the Play Store is what people see in the Play Store

Also note that versionName is only meaningful to users. Android uses versionCode to determine the app version.

And yes, Android’s build system uses a programming language based on Groovy and not some XML based description like Ant. Gradle provides an object model with lots of hooks and a domain specific language – way too much to cover here.

3.3 Upload the App

Time to upload the APK. That’s done using the Google Play Developer Console at https://play.google.com/apps/publish/. If you aren’t happy with their translation to your language or need to create screenshots for an international audience just add “&hl=en” to the URL to force an English UI – you cannot change that in the UI.

On https://play.google.com/apps/publish/:

  1. Log in if logged out
  2. Go to All applications
  3. Click Add new application
  4. In the Add new application window
    1. Select a default language – “en-US” in my case
    2. Enter a title – “DbTradeAlert” in my case; that’s what Play Store users see
    3. Click Upload APK – this will create the new app as a draft, select it, and show its APK pane
  5. In the APK pane click Upload your first APK to Production
  6. Drop the APK on the popup window – after some processing the APK pane shows the new APK’s details
  7. Click Save Draft in the top right – the “APK” item on the left should get a green checkmark.

Note that the app’s status is “Draft in Prod”. It’s missing a lot of required details and couldn’t be published now anyway. To see a list of those requirements click “Why can’t I publish” in the top right corner.

If the upload failed with an error message complaining about debug build, missing certificate or unaligned APK check the steps listed in the previous section.

It seems Google evaluates apps as soon as the APK is uploaded. If an app is rejected you’ll get a mail roughly telling the reason.

The next section shows how to fill the paperwork.

3.4 Provide the Store Listing

Google wants to know a lot for its Store Listing:

  • PRODUCT DETAILS
    • Language and Title: you already provided those
    • Short description: whatever you can fit in 80 characters
    • Full description: you may want to use an optimization strategy here so users actually find your app. The description permits a limited set of html tags for
      formatting.
  • GRAPHIC ASSETS
    • Screenshots: I added 8/8 screenshots for phones
    • Hi-res icon: blew C:\Users\Admin\AppData\Local\Android\sdk\platforms\android-24\data\res\drawable-xxhdpi up to 512 pixels
    • Feature graphic: Must be exactly 1024 w x 500 h – and yes, that’s landscape! I just rescaled and rotated one of the screenshots and hope the app doesn’t get featured 🙂
  • CATEGORIZATION
    • Application type: Applications
    • Category: Finance
    • Content rating: Everyone
    • New content rating: see next section
  • CONTACT DETAILS
    • Email: as used to register for Play Store; Website and Phone not mandatory
  • PRIVACY POLICY
    • Privacy Policy: Not submitting a privacy policy URL at this time.

Click Save Draft in the top right – the “Store listing” item on the left should get a green checkmark.

3.5 Provide the Content Rating

You need to complete the content rating questionnaire:

  1. On the left side click Content Rating
  2. Explanation shows up – read and click Continue
  3. Welcome screen:
    1. Enter and confirm email address
    2. Select app category: UTILITY, PRODUCTIVITY, COMMUNICATION, OR OTHER
    3. Shows additonal questions to answer …
    4. After that click Save questionaire
    5. Calculate rating button becomes active – click it
    6. You’ll get a list with the various ratings for your app and an Apply rating button
    7. Click the Apply rating button

The “Content Rating” item on the left should get a green checkmark. The IARC certificate will show up in a few hours and you’ll also receive a mail with it.

3.6 Provide Information about Pricing & Distribution

Lots of items to mark in this one:

  1. Optionally select any special characteristics of your app like belonging to a User category like Designed for Families or a Device category like Android Wear
  2. Select whether the app is Paid or Free – apps using AdMob are free, see below
  3. Select one or multiple countries to distribute to
  4. If required fill in information about User category or Device category
  5. Mark Consent options
  6. Optionally check Marketing opt-out
  7. Mark Content guidelines
  8. Mark US export laws

Click Save Draft in the top right – the “Pricing & Distribution” item on the left should get a green checkmark.

3.7 Actually Publish

The app status should now be READY TO PUBLISH. Click Publish App in the top right and app status should change to PENDING PUBLICATION.

Google will now take several hours to publish the app – 2.5 in my case when submitting at 1500 UTC.

After the app status changed to PUBLISHED new navigation options will appear – kind of a Firebase Analytics light but with the option to download the raw data:

  • Statistics
  • User Acquisition
  • Ratings & Reviews
  • Crashes & ANRs
  • Optimization Tips
  • Pre-Launch Report
  • Promotions

You won’t be able to connnect your app to AdMob or other Google / Firebase services yet. That’s only possible once Google has indexed the app which may take a day or two.

Next post: Integrate Google Play Services

Additional Resources

Advertisements
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s