Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnBind OtpReader #5

Open
Nishikant04 opened this issue Jul 7, 2017 · 3 comments
Open

UnBind OtpReader #5

Nishikant04 opened this issue Jul 7, 2017 · 3 comments

Comments

@Nishikant04
Copy link

I am not able to unBind OtpReader.

@swarajsaaj
Copy link
Owner

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

@Nishikant04
Copy link
Author

I want listener keeps on receiving the message till my fragment is present.

@swarajsaaj
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants