I'm trying to use this method to copy the database contents from my free app to my paid app but I'm quite lost at the last step:
Check for the presence of the provider & load the data into your paid app.
I can check for the existence of the provider like so:
List<ProviderInfo> providers = getPackageManager().queryContentProviders(
"com.mypackagename.content.MyProvider",android.os.Process.myUid(), 0);
but I have no idea how to do the copying?
I tried getting a ContentResolver like this:
ContentResolver resolver = getContentResolver();
ContentProviderClient client = resolver.acquireContentProviderClient(Uri.parse("content://com.mypackagename"));
I haven't been able to test this yet, but even if it works I'm lost as to the next step. How am I meant to get the data out of one database into the other?