I have developed an app for the school where I work. It is hosted on Google Play, but some of the students have Huawei phones without GMS. I would like them to have the option to download the apk from the school's website. I can implement the notification logic, but I would like to know if a manual update keeps all the app's settings and cached data or not.

So if I notify the users about a new version, direct them to the website, make them download and install the new apk, will they get a fresh installation of the app, or have all their user settings from the older version?

I know there are alternative stores, but it would be easier to handle it on my own, than forcing them to install a second app just to update the other one.

1 Answer 1


Android in general does not care how you install an app or where the app came from. The older Android versions did not even save the information from where the app came from, only recent Android versions record for each app if the app has been installed from PlayStore or not.

The part that Android uses to decide if an app is allowed to install as update for an existing app or not is the APK signature.

As your app is new I assume you were forced to let Google generate and save the app signing key for you, is this correct? So most likely you only are in possession of the upload key but not the app signature key.

In that case you will have to maintain two different versions of your app:

  1. The app versions that are published via Google PlayStore are signed with the app signature key that is saved in the Google Cloud (where you can't access it directly).

  2. The app signature key you use for locally signing the APK file.

Both versions can't be mixed, that means you can not install a APK file from (2) as update to an app installed originally from PlayStore (1).

I would recommend to specify two flavors in your build script and set a different packageName for the version that is directly distributed. Then it is clear to the users that there are to app versions available that are incompatible to each other.

  • Thanks for the detailed answer. It might be a lame question, but can't I just upload the same apk to the website? Most of the users have Google Play, and they would use it anyway. The manual downaload and install would be just a backup solution for the very few. Aug 17, 2022 at 12:49
  • @Nekomajin42 If you are (still) allowed to upload your app to Google Play in APK form then yes. But on new apps upload in APK form is no longer allowed therefore I was assuming that you are uploading your app as App-Bundle signed with the upload signature key.
    – Robert
    Aug 17, 2022 at 14:12
  • Sorry, wrong wording on my end. Of course I upload an aab to Google Play. But in the same menu I can also generate a signed apk. I would like to upload that to the website. So to sum it up, is it possible to upload that apk to our website, notify the user about new versions in the app, direct them to download and install the new apk every time I release an update, and keep all the app's internal settings and cached data? Aug 17, 2022 at 15:19
  • @Nekomajin42 As I wrote that depends if you have the APK signature private key or not. Of course you can create a signed APK but if the used signature key is not the one used by Google then both versions are incompatible to each other (the one can not update the other version). If you use different keys then both variants can be updated by subsequent updates (PlayStore version vs. website version), website to website. To avoid user confusion I strongly recommend to use different packageName for those different versions (use "flavor" feature in gradle project for different packageNames).
    – Robert
    Aug 17, 2022 at 15:54
  • But those, who use the apk build, don't have Google Play. And those, who installed the app from Google Play, won't get in-app notifications to update, because the store handles that automatically. So updating one from the other source should not be a problem. Aug 17, 2022 at 16:03

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .