public static boolean send(XMPPConnection connection,Message msg){
  List<String> toList=getAllowedNotifiedAddresses(connection);
  toList=filterHangoutAddresses(toList);
  if (toList.size() > 0) {
    try {
      Log.d("Sending message to " + toList.size() + " recipients");
      MultipleRecipientManager.send(connection,msg,toList,null,null);
    }
 catch (    Exception e) {
      Log.d("Failed to send message using MultipleRecipientManager method. Sending messages one by one. Ex: " + e.getMessage());
      for (      String notifiedAddress : toList) {
        msg.setTo(notifiedAddress);
        try {
          connection.sendPacket(msg);
        }
 catch (        SmackException.NotConnectedException ex) {
          Log.e("Send message error. Ex: " + ex.getMessage());
        }
      }
      return false;
    }
  }
  return true;
}

public static boolean send ( XMPPConnection connection , Message msg ) { List < String > toList = getAllowedNotifiedAddresses ( connection ) ; toList = filterHangoutAddresses ( toList ) ; if ( toList . size ( ) > 0 ) { try { Log . d ( "Sending message to " + toList . size ( ) + " recipients" ) ; MultipleRecipientManager . send ( connection , msg , toList , null , null ) ; } catch ( Exception e ) { Log . d ( "Failed to send message using MultipleRecipientManager method. Sending messages one by one. Ex: " + e . getMessage ( ) ) ; for ( String notifiedAddress : toList ) { msg . setTo ( notifiedAddress ) ; try { connection . sendPacket ( msg ) ; } catch ( SmackException . NotConnectedException ex ) { Log . e ( "Send message error. Ex: " + ex . getMessage ( ) ) ; } } return false ; } } return true ; }
send a message to all resources not blacklisted
