Saving data between different packages / applications

I have both free and paid app. If a user tries free version

and purchases first, for example, 10 gold

and then upgrades to a paid version, I want him to keep these 10 gold

and not start a fresh start.

So, is there a way to share and access data between apps? And I don't want to save it in the root directory SD card

because the user can easily change it that way.

+3


source to share


4 answers


I think some developers got around this by using their paid app, just to check the payment (if installed, you paid for it) and keep everything (code wise) in the free version. You could just encrypt / decrypt the data written to the SD card. It would also make it easier for the user to back up / restore those saves (and nothing would be lost if the app was reinstalled or something).



+1


source


You can create a file in the application data folder. And save it there.

 /data/data/your_complete_package/your_data_filename

      

And of course you need to encrypt it with something unique to this phone.



Thus, they will not be able to move this file to another used phone.

Please note that the file under the application data folder will be deleted along with your application.

0


source


I think Android content providers can solve this problem: http://developer.android.com/guide/topics/providers/content-providers.html

Content providers control access to a structured dataset. They encapsulate data,> and provide mechanisms to determine the security of the data. Content providers are a standard> interface that connects data in one process to code running in another process.

Your app can implement a ContentProvider and export the uri data you need to provide, and your free and paid version can communicate through the ContentProvider, just like you access Google Contracts.

BTW, ContentProvider supports SQLite and XML, which means you can store it in memory or SD card as you like.

0


source


My solution for this would be to maintain some kind of remote server that stores all the data for users. Logging into the system when logging into the application, authenticating with the server and making all data available.

Any local solution is not permanent. What if the user uninstalls their app? if the phone is damaged and the application cannot be restored?

As a paid user of any application, I would like to see my paid data transfer across different devices.

Just my 2 cents on this matter ...

0


source







All Articles