0

I've already made two different Android projects and they have different package names. They're identical except in the Main Activity where the free version expires after 7 days whereas the paid version checks for a purchase license.

What I want is that when a user installs the paid version then the free version on their device (if it exists) gets replaced by the paid version and also all the user's saved SharedPreferences from the free version move over to the paid version. Is this possible? Or will the user have to uninstall the free version as well as lose all their saved settings?

I read questions related to this and they all talk about using ProductFlavors to create different build variants, but I'm not sure if the purpose of this is just to make the work easier for devs or if it helps in what I'm trying to do.

1 Answers1

0

Yes, if make it like update, replacing old app with new one.

  • How is that done? They have different package names cause I want to have two different play store pages for the free and paid app. –  May 27 '21 at 17:53
  • Hey so do u got a link? –  May 27 '21 at 18:35
  • 1
    You can't replace app uninstall and install deferent app in app. Here is link where people speak about it. https://stackoverflow.com/questions/6813322/install-uninstall-apks-programmatically-packagemanager-vs-intents – Nursultan Jumadilov May 27 '21 at 19:20
  • 1
    But you can make with update or by boolean true in app make kind activated after paid some sum. And give paid version in full content. Just think what is different for codes in this two apps. – Nursultan Jumadilov May 27 '21 at 19:23
  • But then that means it's in-app purchases not two different app versions –  May 27 '21 at 19:25
  • I saw that link before but I was hoping that since it's from 2011 it's not correct. –  May 27 '21 at 19:29