title: How to generate firebase registration token in android
body: <p>I have integrated firebase as a backend in my android app.I am trying to change users device id every time app opens.</p>
  
  <p>I am using below code to get firebase registration id:</p>
  
  <pre><code>FirebaseInstanceId.getInstance().getInstanceId()
      .addOnCompleteListener(new OnCompleteListener&lt;InstanceIdResult&gt;() {
          @Override
          public void onComplete(@NonNull Task&lt;InstanceIdResult&gt; task) {
              if (!task.isSuccessful()) {
                  Log.w(TAG, "getInstanceId failed", task.getException());
                  return;
              }
  
              // Get Instance ID token
              String token = task.getResult().getToken();
  
              Toast.makeText(MainActivity.this, token, Toast.LENGTH_SHORT).show();
          }
      });
  </code></pre>
  
  <p>How can I change this token every time users open an app.
  Any help would be appreciated.</p>
  
  <p><strong>THANKS</strong></p>