Sqlite shared between android Flavors

Asked

Viewed 51 times

0

Hi, I’m looking to make a paid ad-free version of my app that is already published in the play store. I wanted that if a person buys the paid version he does not lose all the data already registered in the free version, where I store everything in Sqlite. What is the way to share Sqlite data between different Flavors on android?

1 answer

0

You need both applications to use the same id.

Add this line to both manifesto:

android:sharedUserId="com.android.xyz"

Another option is through Custom Content Provider.

  • But in android studio only has one manifest. Should I create a folder for each Folder and in each folder use a different manifest? What about the Gradle configuration? Does each Flavor have the same id and version? And when publishing the paid version, the play store will look like a different app?

  • You have paid option and free. This should be put in the Manifest of the paid version and the free version.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.