THE SITUATION:
At the moment of updating my app in the Google Play Store i got this error message:
You uploaded an APK that is signed with a different certificate to your previous APKs.
Similar situation of an already asked question:
The apk must be signed with the same certificates as the previous version
In my case is not a problem. I am still in development and I also needed to change the package name.
So I have unpublished that app and uploaded a new one.
THE QUESTION:
The point is this:
Since i am making a brand new publishing to the Google Play Developer Console, how can I make sure to always be able to update my app?
I have read this warning:
Keep your keystore and private key in a safe and secure place, and ensure that you have secure backups of them. If you publish an app to Google Play and then lose the key with which you signed your app, you will not be able to publish any updates to your app, since you must always sign all versions of your app with the same key.
But practically what exactly I have to do?
Should I store my-release-key.keystore in a safe place?
What about the private key? How can I know the exact private key I am using?
THE CODE:
This is how i create the .apk:
cordova build --release android
keytool -genkey -v -keystore my-release-key.keystore -alias MY_ALIAS_NAME -keyalg RSA -keysize 2048 -validity 10000
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore ./platforms/android/build/outputs/apk/android-release-unsigned.apk MY_ALIAS_NAME
/usr/local/android-sdk-macosx/build-tools/23.0.0-preview/zipalign -v 4 ./platforms/android/build/outputs/apk/android-release-unsigned.apk MY_APP_NAME.apk
Is everything fine with it?
Thank you very much!