Detect if new install or updated version (Android app)

前端 未结 8 1029
-上瘾入骨i
-上瘾入骨i 2020-12-24 06:41

I have an app on the Play Store. I want to put a requirement that if users want to use a certain part of the app, they have to invite a friend before being able to do so. Bu

8条回答
  •  礼貌的吻别
    2020-12-24 06:45

    Check if the old version of your app saves some data on disk or preferences. This data must be safe, i.e. it cannot be deleted by the user (I'm not sure it's possible).

    When the new version is freshly installed, this data won't exist. If the new version is an upgrade from the old version, this data will exist.

    Worst case scenario, an old user will be flagged as a new one and will have a restricted usage.

提交回复
热议问题