Firebase onTokenRefresh() is not called
<p>In my <code>MainActivity</code>in my log, I can see the token using <code>FirebaseInstanceId.getInstance().getToken()</code> and it display the generated token.  But it seems like in my  <code>MyFirebaseInstanceIDService</code> where it is extends to <code>FirebaseInstanceIdService</code>, the <code>onTokenRefresh()</code> is not called, where in this function it was said that the token is initially generated here. I needed to call <code>sendRegistrationToServer()</code> that's why I'm trying to know why it doesn't go in the <code>onTokenRefresh()</code>.  </p>

<p>Here is my code</p>

<pre><code>public class MyFirebaseInstanceIDService  extends FirebaseInstanceIdService {


@Override
public void onTokenRefresh() {
    // Get updated InstanceID token.
    String refreshedToken = FirebaseInstanceId.getInstance().getToken();
    Log.d(TAG, "Refreshed token: " + refreshedToken);

        sendRegistrationToServer(refreshedToken);
    }
}
</code></pre>