How to migrate from a paid android application to an application paid for with in-app billing?

我怕爱的太早我们不能终老 提交于 2019-12-03 10:25:23

Release a separate free version of your app; use the paid version as if it were a license key to the free version.

PackageManager manager = getPackageManager();
if (manager.checkSignatures("old.package.name", "new.package.name")
    == PackageManager.SIGNATURE_MATCH) {
    //full version
}

You could retain both your paid and your free / IAB versions, but base them both on the same library project so that you'd have only one set of source files to maintain. The library project could unlock all features presently available to your paid users for the paid version (activated, say, by testing the package name of the app), and unlock those same features for the free version only when payment had been made via IAB.

This would also allow you to charge users of the paid version for additional features beyond the ones that were present when they paid for the app, if you were to add some truly significant features in the future and wanted to charge an additional amount for those.

It would also have the advantage that your present paid users would not have to do anything at all; to them it would appear that no change had occurred. In particular, they would not have to install your free / IAB app, or go through any special authorization procedures.

The disadvantage would be that you would have to build and upload two projects for every release. This could, however, be partially automated.

  • Increment your database version (ex. 34 -> 35)
  • In method SqliteOpenHelper unlock your features for previous users

Example:

public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion){
    if(oldVersion != 0 and oldVersion <= 34){
       appConf.unlockAllFeatures()
    }
}
  • If your application doesn't use database yet, do it in onCreate, but notice that onCreate is called on a first database call

Correct me if I understood incorrectly. You have mentioned about subscribing which means user details + database + additional information?

if your app does not have database or anything to hold user records. I would suggest to release an update to paid app and enable sharedpreference or common ini file. use the free app to read the same sharedpreferenece file or your own ini file to read the settings.

going for database will help you in the future for more customer relationship activities.

Android dev web site covers this pretty well.

http://developer.android.com/guide/market/billing/index.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!