The application I am working on is hosted on a private site(not in any of the app stores). I want to give users the option to select any version of apk needed for them. There is no problem when updated to a higher version but installing lower version is giving "App Not installed" prompt.
So, I have tried to uninstall the current apk and install the lower version. To implement this, I have tried to download the apk and fire up a service when the user selects a lower version to install. But obviously the service stops right when the app is uninstalled and I cannot continue with installing the lower version.
My question: Is there any workaround to downgrade the app when user needs to?
Details: minSdkVersion:21, targetSdkVersion:30.