====== Pubblicare una app Kivy sul Play Store di Google ======
Vedere anche la pagina **[[kivy_debian_12_android_11]]**.
===== Creazione di un account sviluppatore Play Console =====
Aprendo il link **[[https://play.google.com/apps/publish|play.google.com/apps/publish]]** si viene rediretti sul **[[https://play.google.com/console/signup|play.google.com/console/signup]]** per la creazione di un account sviluppatore. Tale account apparterrà all'utente con cui si è fatto login su Google con il broser (verificare se abbiamo fatto il login aprendo **%%www.google.com%%** oppure **%%mail.google.com%%**). Si è scelta l'opzione **//account per un privato//**.
Google richiede quanto segue:
* Un **indirizzo email** da rendere **pubblico** sul Google Play.
* Un **indirizzo email** e un **numero di telefono** ad uso esclusivo di Google.
* Un **profilo pagamento** con cui pagare 25$ una tantum.
===== Console sviluppatore =====
* Crea release di produzione
* Integrità dell'app
* Protezione automatica non attiva
* Release firmate da Google Play: **Sì**
* App bundle
* Caricato il file **openolyimageshare-0.41-arm64-v8a_armeabi-v7a-release.aab**, viene rifiutato con l'errore //Tutti i bundle caricati devono essere firmati//.
===== Generare una chiave per firmare l'upload dei pacchetti =====
keytool -genkey -v -keystore ~/keystores/googleplay-keystore \
-alias googleplay \
-sigalg SHA256withRSA -keyalg RSA -keysize 2048 -validity 10000
To see the keystore type and fingerprint of the certificate contained into a keystore (requires the password):
keytool -list -v -keystore keystores/googleplay-keystore
The keystore type should be **PKCS12** (Java 9 and later). In the past the keytool produced keystores in **JKS** format, which is Java key store. You can use it directly for signing your release apks for the playstore. So if you're just going to be using it for this purpose, you don't really need to convert it to pkcs12. PKCS12 is not specific to java. If you want to store other keys for other purposes, in the same key store, in a language-neutral format, you may want to convert it to pkcs12:
mv ~/keystores/googleplay-keystore ~/keystores/googleplay-keystore.jks
keytool -importkeystore \
-srckeystore ~/keystores/googleplay-keystore.jks \
-destkeystore ~/keystores/googleplay-keystore.p12 \
-deststoretype pkcs12
The Google Play may require you to convert the certificate into **PEM** format before uploading to its server. Uploading the certificate to the server will simplify the uploading of new releases of the package. This is the command to get the certificate in PEM format:
keytool -export -rfc \
-keystore ~/keystores/googleplay-keystore \
-alias googleplay \
-file ~/keystores/googleplay-keystore.pem
jarsigner -keystore ~/keystores/googleplay-keystore \
openolyimageshare/bin/openolyimageshare-0.41-arm64-v8a_armeabi-v7a-release.aab \
googleplay
To see which certificate (the fingerprint) was used to sign a release package:
keytool -printcert -jarfile \
openolyimageshare/bin/openolyimageshare-0.41-arm64-v8a_armeabi-v7a-release.aab
===== Aggiornare gli screenshot =====
* Google Play Console => Seleziona l'app
* Espandi la base di utenti
* Presenza nello store
* Scheda dello store => Scheda dello Store predefinita => Modifica
===== Web References =====
* **[[https://middlewaretechnologies.in/2020/08/how-to-publish-a-python-kivy-based-android-application-to-google-playstore.html|How to publish a Python Kivy based Android application to Google Playstore]]**
* **[[https://gioelecrispo.github.io/blog/making-an-app-with-kivy/|Making an App with Kivy]]**
* **[[https://support.google.com/googleplay/android-developer/answer/9842756?hl=it|Utilizzare la firma dell'app di Google Play]]**
* **[[https://developer.android.com/studio/publish/app-signing|Sign your app]]**
* **[[https://developer.android.com/studio/publish/upload-bundle?hl=it|Caricare l'app in Play Console]]**
* **[[https://groups.google.com/g/kivy-users/c/5-G7wkbHb_k|Signing an App that's been created with Buildozer]]**
* **[[https://stackoverflow.com/questions/79750404/kivy-app-must-support-16-kb-memory-page-sizes|Kivy: App must support 16 KB memory page sizes]]**