java.lang.Object | ||
↳ | com.gsma.services.rcs.RcsService | |
↳ | com.gsma.services.rcs.capability.CapabilityService |
Capability service offers the main entry point to read capabilities of remote contacts, to initiate capability discovery and to receive capabilities updates. Several applications may connect/disconnect to the API. The parameter contact in the API supports the following formats: MSISDN in national or international format, SIP address, SIP-URI or Tel-URI.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | EXTENSION_MIME_TYPE | Extension MIME type | |||||||||
String | INTENT_EXTENSIONS | Intent broadcasted to discover extensions |
[Expand]
Inherited Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.gsma.services.rcs.RcsService
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
CapabilityService(Context ctx, RcsServiceListener listener)
Constructor
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addCapabilitiesListener(Set<ContactId> contacts, CapabilitiesListener listener)
Registers a capabilities listener on a list of contacts
| ||||||||||
void |
addCapabilitiesListener(CapabilitiesListener listener)
Registers a capabilities listener on any contact
| ||||||||||
final void |
connect()
Connects to the API
| ||||||||||
void |
disconnect()
Disconnects from the API
| ||||||||||
Capabilities |
getContactCapabilities(ContactId contact)
Returns the capabilities of a given contact from the local database.
| ||||||||||
Capabilities |
getMyCapabilities()
Returns the capabilities supported by the local end user.
| ||||||||||
void |
removeCapabilitiesListener(CapabilitiesListener listener)
Unregisters a capabilities listener
| ||||||||||
void |
removeCapabilitiesListener(Set<ContactId> contacts, CapabilitiesListener listener)
Unregisters a capabilities listener on a list of contacts
| ||||||||||
void |
requestAllContactsCapabilities()
Requests capabilities for all contacts existing in the local address book.
| ||||||||||
void |
requestContactCapabilities(Set<ContactId> contacts)
Requests capabilities for a group of remote contacts.
| ||||||||||
void |
requestContactCapabilities(ContactId contact)
This method is deprecated.
Use
requestContactCapabilities(Set) instead. |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.gsma.services.rcs.RcsService
| |||||||||||
From class
java.lang.Object
|
Extension MIME type
Intent broadcasted to discover extensions
Constructor
ctx | Application context |
---|---|
listener | Service listener |
Registers a capabilities listener on a list of contacts
contacts | Set of contact Identifiers |
---|---|
listener | Capabilities listener |
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsServiceNotAvailableException |
Registers a capabilities listener on any contact
listener | Capabilities listener |
---|
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsServiceNotAvailableException |
Connects to the API
RcsPermissionDeniedException |
---|
Returns the capabilities of a given contact from the local database. This method doesn't request any network update to the remote contact. The parameter contact 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.
contact | Contact Identifier |
---|
RcsPersistentStorageException | |
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsPersistentStorageException | |
RcsServiceNotAvailableException |
Returns the capabilities supported by the local end user. The supported capabilities are fixed by the MNO and read during the provisioning.
RcsPersistentStorageException | |
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsPersistentStorageException | |
RcsServiceNotAvailableException |
Unregisters a capabilities listener
listener | Capabilities listener |
---|
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsServiceNotAvailableException |
Unregisters a capabilities listener on a list of contacts
contacts | Set of contact identifiers |
---|---|
listener | Capabilities listener |
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsServiceNotAvailableException |
Requests capabilities for all contacts existing in the local address book. This method initiates in background new capability requests for each contact of the address book by sending SIP OPTIONS. The result of a capability request is sent asynchronously via callback method of the capabilities listener. The result of the capability refresh request is provided to all the clients that have registered the listener for this event.
RcsServiceNotRegisteredException | |
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsServiceNotAvailableException | |
RcsServiceNotRegisteredException |
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.
contacts | Set of contact identifiers |
---|
RcsServiceNotRegisteredException | |
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsServiceNotAvailableException | |
RcsServiceNotRegisteredException |
This method is deprecated.
Use requestContactCapabilities(Set)
instead.
Requests capabilities to a remote contact. This method initiates in background a new capability request 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 contact 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.
contact | Contact Identifier |
---|
RcsServiceNotRegisteredException | |
RcsServiceNotAvailableException | |
RcsGenericException | |
RcsServiceNotAvailableException | |
RcsServiceNotRegisteredException |