Solved

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

  • 14 October 2021
  • 5 replies
  • 81 views

Userlevel 1
Badge +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

icon

Best answer by tina 20 October 2021, 18:16

View original

5 replies

Userlevel 1
Badge +5

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

Userlevel 1
Badge +5

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

 

 

Userlevel 5
Badge +10

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 - 

 

Userlevel 1
Badge +5

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?

Userlevel 5
Badge +10

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 

Reply