Skip to main content
Question

How can i know the user current subscription

  • 6 September 2023
  • 1 reply
  • 113 views

Forum|alt.badge.img+3

I want to highlight the current plan(product) on the pricing table by mapping these two:

  1. customerInfo.getActiveSubscriptions()
  2. offerings.getCurrent().getAvailablePackages()

 

but what I  found is that there is no any unikey from them. here is what i got:

  1. customerInfo.getActiveSubscriptions() →  ["pro_plus:monthly"]
  2. offerings.getCurrent().getAvailablePackages() → { "productId":"pro", "basePlanId":"monthly"}

is that  mean i need to combind the key "productId”+”:”+"basePlanId" by myself?or any better way to do that? 

this is the sdk question using java in android.

1 reply

sharif
RevenueCat Staff
Forum|alt.badge.img+9
  • RevenueCat Staff
  • 513 replies
  • September 8, 2023

Hello,

Another option would be to use the Package.product.id property which should have the product ID and baseplan ID in the same format as what you see on the device. Does that work?


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings