title: Android/Firebase - Check to see if you are subscribed to topic
body: <p>I am wondering if there is a way to test to see if you are subscribed to a topic on the android side of things.</p>
  
  <p>Basically, I am <em>HOPING</em> that all devices will subscribe to a topic during their installation, when the token is first obtained by the device. However, there is always a chance that the device fails to subscribe. The FCM registration token should be installed on the device for a long time, and thus, the onTokenRefresh() method shouldn't be called again without clearing data, uninstall/reinstall, etc.</p>
  
  <p>My idea was to test to see if the device is subscribed to a topic in my MainActivity, and if not, then try to subscribe again. If it fails to subscribe, then get a new token and try again, etc.</p>
  
  <pre><code>    @Override
      public void onTokenRefresh() {
      // Get updated InstanceID token.
      String refreshedToken = FirebaseInstanceId.getInstance().getToken();
      Log.e(TAG, "Refreshed token: " + refreshedToken);
  
      // Subscribe to a topic
      Log.e(TAG, "Subscribing to topic");
      FirebaseMessaging.getInstance().subscribeToTopic("test");
  </code></pre>
  
  <p>So, I can subscribe and unsubscribe, but how do I check if the device is subscribed to a topic? I did my fair share of googling, and couldn't find anything, unfortunately. </p>
  
  <p>I would greatly appreciate any/all assistance. Thanks!</p>