TypeError: getAndroidModule().isReadyAndroid is not a function.
See original GitHub issueisReadyAndroid is not implemented in the native layer. Perhaps it was left out during the migration to kotlin?
Version of react-native-iap
8.0.1
Version of react-native
0.64.2
Platforms you faced the error (IOS or Android or both?)
Android
Expected behavior
isReadyAndroid is implemented and returns a Promise<boolean>
Actual behavior
isReadyAndroid raises a TypeError (TypeError: getAndroidModule().isReadyAndroid is not a function.
)
Tested environment (Emulator? Real Device?)
Nokia 5.4
Steps to reproduce the behavior
just call RNIap.isReadyAndroid()
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:7 (3 by maintainers)
Top Results From Across the Web
TypeError _this2.getWifiList().bind is not a function. React ...
The issue is in the way you are calling .bind() : this.getWifiList().bind(this). Note that .bind() is a method of the Function prototype, ...
Read more >dooboolab/react-native-iap (Raised $40.00) - Issuehunt
clearTransaction() throwing "Cannot finish a purchasing transaction" ... acknowledgePurchaseAndroid is not a function ... TypeError: getAndroidModule().
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
IMO removing it is bad.
For us, it was necessary because we kept the android connection alive outside of a single container but rather inside of some redux state, (we didn’t just have one screen that used the object, but queried the API at different points to show different prices and special offer screens). Therefore using hooks that automatically re-initialize the connection when the component mounts/unmounts was simply not sufficient.
Since there was no way to check if the connection was alive or not we would have to re-initialize the connection every time we would need to query it. The connection got killed at “random” times (device would go to sleep, app would go to background) but not always depending if the user would re-open the app in a certain interval.
So basically… the method was needed, not just a convenience. But I haven’t checked the codebase, if you can guarantee the google api connection is alive 100% of the time, then there is no need to expose this to JS, but if the connection can still silently die and any init method needs to be called, then there needs to be something to check the state.
i have the same issue here, isReadyAndroid is not exist, and i do not know why document has it