title: Not able to connect to Aws Iot using AWSIotMqttManager and Aws Cognito credentials
body: <p>I am using AWS Cognito for sign in and to get temporary credentials. I tried PubSub API in Ionic app in browser and it is working fine for Device shadow updates. Now I have written code in Java for android but the MqttManager keeps on reconnecting.</p>
  
  <p>This a native code in Ionic 4 + Capacitor plugin</p>
  
  <pre><code>@PluginMethod()
      public void Init(PluginCall call)
      {
          String clientId = call.getString("clientId", null);
          if(clientId == null)
          {
              UUID uuid = UUID.randomUUID();
              clientId = uuid.toString();
          }
          mqttManager = new AWSIotMqttManager
          (
                  clientId,
                  "m6jklghidefabc-ats.iot.us-west-1.amazonaws.com"
          );
  
          String id = AWSMobileClient.getInstance().getIdentityId();
          if(id == null)
          {
              call.reject("Could not get identity id");
              return;
          }
          else
          {
              Log.i("Plugin===", id);
          }
  
          //
          //  Connect MQTT Manager
          //
          try
          {
              MqttPlugin th = this;
              mqttManager.connect(AWSMobileClient.getInstance(), new AWSIotMqttClientStatusCallback()
              {
                  @Override
                  public void onStatusChanged(final AWSIotMqttClientStatus status, final Throwable throwable)
                  {
                      Log.i("Plugin====", status.toString());
  
                  }
              });
              JSObject ret = new JSObject();
              ret.put("clientId", clientId);
              call.resolve(ret);
  
          }
          catch (final Exception e)
          {
              Log.i("Plugin==E=", e.getMessage());
              call.reject(e.getMessage());
          }
      }
  </code></pre>
  
  <p>Status is Connecting then Reconnecting...
  Reconnecting keeps getting printed in the Logcat
  Please indicate me why this is failing to connect when the auth with AWS Cognito is working perfectly fine. My policies seems to be in place because from browser I am able to connect using PubSub api in Ionic 4 app</p>