Releasing your first App is a great milestone, but with releasing the second one, here comes the question: Should I use the same key to sign my new app, or should I generate a new key for it?!!
Well, it totally depends on your needs, so let’s see different needs:
Why using same key for different apps?
- When you want to use App modularity features (as recommended by the official documentation):
Android allows apps signed by the same certificate to run in the same process, if the applications so requests, so that the system treats them as a single application. In this way you can deploy your app in modules, and users can update each of the modules independently.
- When you want to share Code/Data securely between your apps through permissions (also as recommended by the official documentation):
Android provides signature-based permissions enforcement, so that an app can expose functionality to another app that is signed with a specified certificate. By signing multiple apps with the same certificate and using signature-based permissions checks, your apps can share code and data in a secure manner.
- If you want to avoid the hassle of managing different keys for different apps.
Why using different keys for different apps?
- If you are somehow paranoid about security (and you should), not to put all the eggs in one basket, which is highly recommended in this article.
-
When the apps are completely different & won’t ever use the app-modularity or Code/Data sharing described above.
-
When there is a chance (even a small one) that you will sell one of the apps separately in the future, then that app must have its own key from the beginning.
Some useful numbers:
As per this article, they made a study on August 2014, they found that Google Play has about 246,000 Android apps but only 11,681 certificates were found!
The distribution of the number of apps sharing the same key is shown below. The X-axis is the number of apps sharing the same certificate. The Y-axis is the number of certificates.
Be aware that once you signed your app and uploaded it to Google Play, you can’t undo this step, you can’t sign it with a different certificate key. so make your decision wisely!
I hope you find here the answer you were searching for, & hope you share your case with us in the comments .. Good Luck 🙂