Open shubham2102 opened 4 years ago
Any leads??
Hi, @shubham2102 I am not maintaining this repo now, you can fix this issue yourself
just add
public void unRegisterListener() {
Log.d(TAG, "unregister");
unregisterReceiver(mReceiver);
}```
in xxModule.java
and call this instead of removeListener
https://medium.com/groww-engineering/google-sms-retriever-api-integration-with-react-native-fab31947f438 checkout this blog for more clarity
let me know if you need more help.
Will try to update the code by this weekend
Hi @Rajat421 it's giving this error:
Code changes were:
@ReactMethod
public void unRegisterListener() {
// Log.d(TAG, "unregister");
unregisterReceiver(mReceiver);
}
in RNSmsRetrieverModule.java
And I was accessing the unregister method in my application by:
SmsListener.unRegisterListener();
How can we remove the listener? As of now everything works fine but the listener is not getting removed. I've tried
And I am getting error:
TypeError: TypeError: _reactNativeAndroidSmsListener.default.removeListener is not a function.