dooboolab-community / react-native-iap

In App Purchase module for React Native!
https://react-native-iap.dooboolab.com
MIT License
2.74k stars 633 forks source link

Android - Subscription not reflected in ra #2677

Open HemangiVekaria opened 5 months ago

HemangiVekaria commented 5 months ago

Description

I created 3 subscription plan on my google play console. Only one of them get reflected in application. I am using

import { initConnection, requestPurchase, useIAP } from 'react-native-iap';

const { subscriptions } = useIAP();

initConnection() .then(async log => { console.log('subscriptions', JSON.stringify(subscriptions)); }) .catch(e => { console.log(e); });

This prints only one product in log.

Expected Behavior

I want to show all 3 in application

Environment:

Accoladecreative commented 4 months ago

It will work over time, when I did mine, it took some few days after some tries, I started working properly and perfectly

itsaliraxa commented 4 months ago

I have the same issue. Is it necessary to upload a new build after creating a new subscription on Google play console?

Accoladecreative commented 4 months ago

It’s not necessary, the device will connect with the play store server and reflect update,

itsaliraxa commented 4 months ago

It’s not necessary, the device will connect with the play store server and reflect update,

But I've created new subscriptions and these are not reflecting in the app. But the one that I created 2 weeks ago, it was reflecting after few minutes. Do you know what could be the reason?

Accoladecreative commented 4 months ago

It’s not necessary, the device will connect with the play store server and reflect update,

But I've created new subscriptions and these are not reflecting in the app. But the one that I created 2 weeks ago, it was reflecting after few minutes. Do you know what could be the reason?

That’s should be an issues with your code then

itsaliraxa commented 4 months ago

@Accoladecreative Do you know how long it will take to show a new subscription in the app?

Accoladecreative commented 4 months ago

For the first time, it can take few days. I will say 3 days max with the ones I’ve worked with.

Then ones it started already, it will always reflect every changes immediately

HemangiVekaria commented 4 months ago

I resolved the issue by clearing the cache for Google Play Store and waiting for 5-10 minutes. Afterward, all the subscription products created on the Google Console were properly reflected in my application.

itsaliraxa commented 4 months ago

How you clean the cache for google play store?

On Mon, 19 Feb 2024 at 9:12 AM, Hemangi @.***> wrote:

I resolved the issue by clearing the cache for Google Play Store and waiting for 5-10 minutes. Afterward, all the subscription products created on the Google Console were properly reflected in my application.

— Reply to this email directly, view it on GitHub https://github.com/dooboolab-community/react-native-iap/issues/2677#issuecomment-1951660565, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4XC7SVAEEZWHUUMKOSY3XTYULGLRAVCNFSM6AAAAABCGWWQS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJRGY3DANJWGU . You are receiving this because you commented.Message ID: @.***>

HemangiVekaria commented 4 months ago

How you clean the cache for google play store? On Mon, 19 Feb 2024 at 9:12 AM, Hemangi @.> wrote: I resolved the issue by clearing the cache for Google Play Store and waiting for 5-10 minutes. Afterward, all the subscription products created on the Google Console were properly reflected in my application. — Reply to this email directly, view it on GitHub <#2677 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/A4XC7SVAEEZWHUUMKOSY3XTYULGLRAVCNFSM6AAAAABCGWWQS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNJRGY3DANJWGU . You are receiving this because you commented.Message ID: @.>

You can just go to app setting from your device and just go to Storage then clear cache from there.