Question

Issues on UserID when you don't have a Login system (Kotlin)

  • 27 December 2023
  • 2 replies
  • 49 views

Badge +2

Hello there,

I am trying to implement RevenueCat on my Android app which does not have a Login system.

I was wondering in this case how do I manage the UserID to stay the same throughout app deletion, re-installations and across devices?

 

On my iOS app I used NSUbiquitousKeyValueStore, so that it’s connected to the Apple ID and it works perfectly, but I can’t find a way on Kotlin.

 

I tried the Auto Backup APIs, but while it works on the same device if I delete and re-install the app, it does not work across different devices with the same Google Account.

 

I know that even if a new User ID is created the purchase will be transferred cause there is only one receipt, but is it correct that it sort of creates different users that bounce the purchase around?

 

Thank you,

Giada


2 replies

Userlevel 6
Badge +8

Hey @jadebowl!

Without an account/login system, I’m not sure of any way to do this on Android like with the iCloud key value store on iOS - maybe someone else who has done this before can chime in here!
 

I know that even if a new User ID is created the purchase will be transferred cause there is only one receipt, but is it correct that it sort of creates different users that bounce the purchase around?


RevenueCat will automatically transfer purchases to user ID’s that ‘claim’ a receipt. This means any kind of purchase, or restore, or sync, will trigger a receipt to be transferred from whatever user currently owns the receipt, to whichever is now performing one of those actions. If a user makes a purchase with a user ID, then logs out/deletes the app, then reinstalls and is assigned a new user ID, the purchases will be transferred to that new user ID.

Let me know if that helps!

Badge +2

Hello @cody,

Thank you very much for your answer. Since I only managed to have the same User ID if the user deletes and re-installs the app on the same device but not across devices, I guess I’ll just let different Users ID for different devices if there is no other way, that will bounce around the purchase in case.

 

Have a great day,

Giada

Reply