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
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.