public void requestContactCapabilities(Set<ContactId> contacts) throws RcsServiceNotRegisteredException, RcsServiceNotAvailableException, RcsGenericException {
  if (mApi == null) {
    throw new RcsServiceNotAvailableException();
  }
  if (contacts == null || contacts.isEmpty()) {
    throw new RcsIllegalArgumentException("contacts must not be null or empty!");
  }
  try {
    mApi.requestContactCapabilities2(new ArrayList<>(contacts));
  }
 catch (  Exception e) {
    RcsIllegalArgumentException.assertException(e);
    RcsServiceNotRegisteredException.assertException(e);
    throw new RcsGenericException(e);
  }
}

public void requestContactCapabilities ( Set < ContactId > contacts ) throws RcsServiceNotRegisteredException , RcsServiceNotAvailableException , RcsGenericException { if ( mApi == null ) { throw new RcsServiceNotAvailableException ( ) ; } if ( contacts == null || contacts . isEmpty ( ) ) { throw new RcsIllegalArgumentException ( "contacts must not be null or empty!" ) ; } try { mApi . requestContactCapabilities2 ( new ArrayList < > ( contacts ) ) ; } catch ( Exception e ) { RcsIllegalArgumentException . assertException ( e ) ; RcsServiceNotRegisteredException . assertException ( e ) ; throw new RcsGenericException ( e ) ; } }
requests capabilities for a group of remote contacts . this method initiates in background new capability requests to the remote contact by sending a sip options . the result of the capability request is sent asynchronously via callback method of the capabilities listener . the parameter contacts supports the following formats : msisdn in national or international format , sip address , sip - uri or tel - uri . if the format of the contact is not supported an exception is thrown . the result of the capability refresh request is provided to all the clients that have registered the listener for this event .
