Skip to main content
Answer

Purchases.getSharedInstance().getOfferings(new ReceiveOfferingsListener() returns NULL

  • October 14, 2021
  • 5 replies
  • 263 views

Forum|alt.badge.img+5

Hello,

I am using Java in Android Studio.  When i debug my app, I can see that my id (from firebase authentication) has logged in in the past.  I have set up offerings (actually just 1) in RevenueCat, but when i try to fetch the offerings with getOfferings, it returns NULL.  

I read in a different post that:
The app needs to be be in the internal testing track on the Google Play Store in order to fetch subscriptions

 

Is this true?  Is that the reason why my app cannot “see” my offerings

Best answer by tina

Hey @Dunwiddie 

That’s correct that the app needs to be on a testing track, either closed or internal, in order for RevenueCat to communicate with Google Play Console to fetch the products in your Offering. Have you set up a testing track and adding a testing user yet? Docs for reference: https://docs.revenuecat.com/docs/google-play-store 

This post has been closed for comments

5 replies

tina
RevenueCat Staff
Forum|alt.badge.img+10
  • RevenueCat Staff
  • Answer
  • October 20, 2021

Hey @Dunwiddie 

That’s correct that the app needs to be on a testing track, either closed or internal, in order for RevenueCat to communicate with Google Play Console to fetch the products in your Offering. Have you set up a testing track and adding a testing user yet? Docs for reference: https://docs.revenuecat.com/docs/google-play-store 


Forum|alt.badge.img+5
  • Author
  • Active Member
  • October 20, 2021

Thanks much.  I am starting on an closed track, but may switch to an internal track due to the review time.  This is my 1st app and my first time with the GPS (I’m an apple person). In any case, what runs directly from android studio to my phone seems to work correctly, but running from the GPS cannot get past google authentication.  

 

I’ve put toast messages in, but is there a better way to debug from the play store?


tina
RevenueCat Staff
Forum|alt.badge.img+10
  • RevenueCat Staff
  • October 21, 2021

Hi @Dunwiddie 

Can you clarify on what you mean by cannot get past Google authentication? 

Have you checked out this community post on empty Offerings - 

 


Forum|alt.badge.img+5
  • Author
  • Active Member
  • October 21, 2021

Hi Tina -

I’m getting closer.  My issue with google authentication was because although my sha1 fingerprint was set up for debug in firebase, it wasn’t on the release version

Currently i am researching a disconnect between getting offerings and making a purchase.  When invoking purchasePackage(), it needs a package identifier.  I need to figure out how to get that from my setup.  My users will either have a weekly subscription or a monthly subscription (radio buttons).

 

 


Forum|alt.badge.img+5
  • Author
  • Active Member
  • October 25, 2021

Hi -

 

I actually had 2 issues going on

  1.  I needed to add my app to a testing track in the Google Play Store.
  2. I was not using a global ‘offering’ variable.  So while the offerings was retrieved, the offering variable was not ‘seen’ in my ButtonClick() functions.

I hope that this helps