Adding your app to Google Play
In this part of the tutorial for publishing an application on Google Play you will learn how to add your app to Google Play and how to make a first internal release.
We assume that you have access to the Google Play Console account of KDE. You can request access by sending a ticket to our KDE system administrators.
Adding your app on Google Play
Sign in on Google Play Console.
After signing in you'll see the KDE apps that are already registered on Google Play.
Add a new app with "Create app".
Enter the name of your app, select "App" or "Game", select "Free" or "Paid" (note the hint if you select "Free"), confirm the declarations (after reading them), and then click "Create app".
After creating your app you'll see the dashboard for your app with suggestions for the next steps.
Creating a first internal release of your app
We will create a first internal release of KTrip. The dashboard tells us what to do.
We skip the task "Select testers" for now. Click on "Create a new release" instead. This brings us to the "Internal testing" page.
Click "Create new release". This opens the page for creating an internal testing release.
Before we can upload the first app bundle of KTrip we need to take a short detour to set the signing key and the upload key to use for KTrip.
Setting Signing Key and Upload Key
Alternatively to generating the signing key yourself you can ask our system administrators to generate a new signing key and upload it to Google Play. In this case you can skip the first two sections and continue with Upload the Upload Key Certificate.
Generating a Signing Key
Click on "Choose signing key". Google Play asks whether we want to use a Google-generated app signing key or our own app signing key.
For KTrip we choose to use our own key because this gives us more flexibility. Click on "Use a different key".
Google recommends to use individual signing keys for each app. We follow this good practice and generate a new signing key for KTrip. keytool, the tool we use for generating the key, is included in the OpenJDK runtime environment.
# first we generate a decent password for the new key
head -c 18 /dev/urandom | base64 >ktrip-google-play-signing.keystorepass
# then we generate the new key
keytool -genkeypair -alias org.kde.ktrip -keyalg RSA -keysize 2048 \
-dname "CN=KTrip Signing Key, OU=Release Team, O=KDE, L=Berlin, C=DE" \
-keypass:file ktrip-google-play-signing.keystorepass \
-validity 10000 \
-keystore ktrip-google-play-signing.keystore \
-storepass:file ktrip-google-play-signing.keystorepass
I have generated the key on the machine the signing service runs on. If you generate the key yourself then you have to ask our system administrators to upload the keystore file and the file with the password to this machine.
Note
For the releases of KTrip published in our F-Droid repositories we use a different signing key which is also used to sign almost all other apps published in our F-Droid repositories. We decided not to upload this key to Google Play. The minor drawback is that one cannot update a KTrip installed from F-Droid with a KTrip from Google Play and vice versa.Uploading the Signing Key to Google Play
Google Play gives us instructions how to export and upload the signing key. Follow those instructions.
Clicking on "Download encryption public key" will, after a short time, download a file named encryption_public_key.pem
.
Clicking on "Download PEPK tool" downloads a file named pepk.jar
.
For the key generated above the commands for exporting and encrypting the private signing key with the PEPK tool looks as follows:
# print the password that protects the signing key and the keystore
cat ktrip-google-play-signing.keystorepass
# run the PEPK tool
java -jar pepk.jar --keystore=ktrip-google-play-signing.keystore \
--alias=org.kde.ktrip \
--output=ktrip-signing-key.zip \
--include-cert --rsa-aes-encryption \
--encryption-key-path=encryption_public_key.pem
Enter password for store 'ktrip-google-play-signing.keystore':
Enter password for key 'org.kde.ktrip':
Click on "Upload generated ZIP" and upload the file ktrip-signing-key.zip
.
Uploading the Upload Key Certificate to Google Play
Download KDE's Upload Key Certificate.
Then click on "Show instructions" next to "For increased security, create a new upload key (optional)."
Since we already have an upload key we skip directly to step c., click on "Upload your upload key certificate" and upload KDE's upload key certificate.
Finally, click "Save" to save and close the "App signing preferences".
Creating a first internal release of your app continued
After setting the signing key and the upload key we can continue publishing a first internal release of KTrip.
Click on "Upload" and select the signed app bundle of KTrip we created in the previous part of this tutorial on packaging an application for Google Play. When the upload is complete then the app bundle will be listed below the upload drop zone and the release name will be filled in with the version information of the app bundle.
Click on "Save as draft" to save the changes.
Then click on the "Next" button to get to the "Preview and confirm" page.
Before clicking on "Save and publish" we check the warnings (the two warnings were not relevant for KTrip). Moreover, we verify that the app bundle contains a working app. For this we click on the arrow button next to the app bundle to get to the Details page of the app bundle.
Then we switch to the Downloads page.
On this page we click on the download button of the "Signed, universal APK" asset to download the APK of KTrip that Google Play created from the uploaded app bundle. This APK is pretty large because it contains the binaries for all native platforms we support. We could now upload this APK to some other store. Instead we copy the APK to our Android device and install it to give KTrip a quick sanity check. You will have to uninstall a KTrip installed from F-Droid.
After verifying that the APK works we click the "Save and publish" button and acknowledge the request for confirmation.
This concludes the creation of the first internal release of KTrip.
Getting KTrip ready for review by Google
To get KTrip ready for review by Google we need to tell Google more about the content of the app and we need to set up how it should be presented on Google Play.
Go to the Dashboard and show the tasks of "Set up your app". We see a long list of tasks. We tackle them one by one. Most tasks are easy to complete because they don't apply to KTrip. Things may be more complicated for your app.
Letting Google Play know about the content of KTrip
Privacy policy
Click on "Set privacy policy".
On the Privacy Policy page we enter the URL of the KDE Software Privacy Policy.
Then we click "Save" and go back to the Dashboard.
Yeah! The first task is complete. 11 more tasks to go.
App access
Google Play wants to know if some parts of the app can only be accessed after entering login credentials or after fulfilling other requirements. For KTrip that's not the case.
Note
For a chat app like NeoChat which cannot be reviewed without a Matrix account it's more complicated. For the Microsoft Store we provide Microsoft with credentials for a test account they can use to review NeoChat.Ads
That one is easy. KDE apps don't contain ads.
Content rating
Now it gets a bit more interesting. Although for KTrip it's rather boring.
Click "Start questionnaire".
As contact address for the content ratings we add our "KDE on Android" email address.
KTrip is neither a game nor a social or communication app so that we choose "All Other App Types" as category.
On the next page we can quickly answer the first two questions with "No".
The question about "Online Content" we answer with "Yes" because KTrip does feature "content that isn't part of the initial app download": public transport connections. Information on public transport connections isn't ratings-relevant so that the questions about the content can quickly be answered with "No".
The remaining questions can again quickly be answered with "No".
After saving our answers and clicking "Next" we get to the summary.
The different age ratings for KTrip vary between "for all ages" and "at least 3 years old".
Target audience
The question about the target audience is again interesting. I checked "18 and over" because KTrip does not specifically target younger persons even if younger persons can certainly use KTrip to look up public transport connections.
On the next page which asks whether the store listing of KTrip could appeal to children I answered "No". I think KTrip's icon isn't cute enough to appeal to children and the description and the screenshots (see below) are rather the opposite of appealing to children.
After clicking "Next" we get to the summary where we save our answers.
News apps
No, KTrip isn't a news app.
COVID-19 contact tracing and status apps
Neither KTrip is a publicly available COVID-19 contact tracing or status app.
Data safety
Next we need to "help users understand how" KTrip "collects and shares their data".
KTrip shares the search criteria entered by the user with the public transport information providers. Additionally, the providers will see the user's IP address. The IP address isn't a user data type that needs to be (and can be) mentioned in Google Play's Data safety section. And the search criteria that are sent to the providers don't need to be disclosed as sharing because we can assume that "the user reasonably expects the data to be shared" when they click the "Search" button ("a specific user-initiated action").
Following these considerations we can safely answer "No" to the question whether KTrip collects or shares any of the required user data types.
The preview shows what will be shown to users on Google Play for KTrip.
Government apps
No, KTrip was not developed by or on behalf of a government.
Financial features
KTrip doesn't provide any financial features ...
... so that we don't have to provide any additional documentation.
This completes the long list of tasks to let Google Play know about the content of KTrip.
Completing the presentation of KTrip on Google Play
Now we set up how KTrip should be presented on Google Play.
Store settings
We choose "Travel & Local" as category for KTrip and from the long list of available tags we select "Public transport".
As contact details we enter the email address of the general KDE users mailing list kde@kde.org because there isn't a more specific mailing list for KTrip. As website we point to KTrip's page on our KDE Applications website.
Finally, we leave external marketing enabled.
Main store listing
Last but not least, we add some text and some images for KTrip's store listing. As short description and full description we use the summary and the description from KTrip's AppStream data. We add only the English descriptions. The translations provided by our great translation teams will be uploaded automatically by our CI/CD system.
As app icon we use the image ic_launcher-playstore.png which is also put into the (fastlane) meta data for publication on F-Droid and Google Play.
For KTrip no image suitable as feature graphic existed. Inspired by the feature graphic of Itinerary I derived a feature graphic for KTrip from its app icon.
Finally, Google Play asks for at least 2 phone screenshots. In KTrip's repository there was only one screenshot and that screenshot was outdated. I took some new screenshots and added them to Google Play (and to KTrip's repository). Tablet screenshots and Chromebook screenshots are optional so that we don't provide those for now.
After saving our changes we are done with setting up KTrip to get it ready for review by Google.
Preparing KTrip for submission of new releases by our CI/CD system
To allow our CI/CD system to update KTrip's store listing (e.g. to add the translated descriptions) and to upload new builds we need to create a draft release in the "Open testing" (aka beta) track (which the CI/CD system uploads new builds to) and a draft release in the "Production" track. These (draft) releases are needed to work around shortcomings in the tools we use.
Creating a draft release in the Open testing track
To create a new (draft) release in the Open testing track we promote the release we created in the Internal testing track to Open testing.
Navigate to the Internal testing page, click on the "Promote release" drop down below the listed release and select "Open testing".
The new release is created immediately. Don't be confused that "Save as draft" is disabled. The new release has automatically been saved as draft so that there's nothing left to do for us.
Creating a draft release in the Production track
To create a new (draft) release in the Production track we promote the release we created in the Internal testing track to Production.
Navigate again to the Internal testing page, click on the "Promote release" drop down below the listed release and select "Production". Note that promoting the release to "Open testing" is not possible. That's because there is already a draft release in the Open testing track.
Again the new release is created immediately and has automatically been saved as draft.
Summary
We learned how to add an application like KTrip to Google Play. We made a first internal release and prepared everything to publish (beta) releases of KTrip on Google Play with the KDE CI/CD system.