开发者

Import data from free app db to paid app db

I currently have a free application on the market and I'd like to offer a paid version of it as well. Once the paid version is installed, I want to import the db and shared preferences from the free version so users can uninstall it witho开发者_开发技巧ut losing anything.

The problem is this: in my free version, I don't have a android:sharedUserId set. If I add one, the app's id on the system changes and I can't access the data anymore. Both apps will be signed using the same certificate. How can I import the data without messing up the permissions of the free app?


Unfortunately, there's no easy answer.

You could add a Service with an AIDL interface or a ContentProvider in a future release of the free app, then use that to import the data into the paid app. Depending on the data, that might require some homebrew "licensing" mechanism to make sure only your paid app is allowed to use the published interfaces.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜