private void connectExtendedAction(Bundle data){ // This is called differently from a normal connect if(callback instanceof MqttCallbackExtended){ boolean reconnect = data.getBoolean(MqttServiceConstants.CALLBACK_RECONNECT, false); String serverURI = data.getString(MqttServiceConstants.CALLBACK_SERVER_URI); ((MqttCallbackExtended) callback).connectComplete(reconnect, serverURI); } }