otpReader
otpReader copied to clipboard
UnBind OtpReader
I am not able to unBind OtpReader.
@Nishikant04 As I understand, you mean the listener keeps on receiving the messages (yes it may be necessary if we need to keep receiving messages multiple times), currently workaround would be if you can handle the same using a received flag in your OTPListener if you want to receive the message only once.
I want listener keeps on receiving the message till my fragment is present.
@Nishikant04 In current version there is no unbind method in Receiver though, as a workaround you can use OtpReader.bind(null,""), to remove binding to your listener in your fragment's onDestroy() method and call OtpReader.bind in your fragment's onResume() I think that should solve the issue of listening only when fragment is there.