title: Firebase, is it possible to place verifyPhoneNumber outside activity without passing activity reference to it?
body: <p>I'm trying to implement Firebase phone number authentication. Official docs says that I need to call </p>
  
  <pre><code>PhoneAuthProvider.getInstance().verifyPhoneNumber(
      phoneNumber,        // Phone number to verify
      60,                 // Timeout duration
      TimeUnit.SECONDS,   // Unit of timeout
      this,               // Activity (for callback binding)
      mCallbacks);        // OnVerificationStateChangedCallbacks
  </code></pre>
  
  <p>And pass my activity reference for callback binding.</p>
  
  <p>There is another overloaded method in docs, which accepts <code>TaskExecutors.MAIN_THREAD</code> (the Executor used to call the <code>OnVerificationStateChangedCallbacks</code> callbacks), instead of activity ref. </p>
  
  <p>That's what I needed. In this case </p>
  
  <pre><code>phoneAuthProvider.verifyPhoneNumber(
          phone,
          1,
          TimeUnit.MINUTES,
          TaskExecutors.MAIN_THREAD,
          callbacks,
          resendingToken
  );
  </code></pre>
  
  <p>The code works perfectly. But the problem is: callbacks continue their work in a background infinitely long. I didn't find any methods in the documentation to stop these callbacks.</p>
  
  <p>So, how can I manually remove these callbacks, when I don't need them anymore?</p>