| java.lang.Object | ||
| ↳ | com.gsma.services.rcs.RcsService | |
| ↳ | com.gsma.services.rcs.sharing.geoloc.GeolocSharingService | |
This class offers the main entry point to share geolocation info during a CS call. 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.
| [Expand] Inherited Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class
com.gsma.services.rcs.RcsService | |||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| GeolocSharingService(Context ctx, RcsServiceListener listener) Constructor | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void | addEventListener(GeolocSharingListener listener) Adds a listener on geoloc sharing events | ||||||||||
| final void | connect() Connects to the API | ||||||||||
| void | deleteGeolocSharing(String sharingId) Deletes a geoloc sharing by its sharing id from history and abort/reject any associated
 ongoing session if such exists. | ||||||||||
| void | deleteGeolocSharings(ContactId contact) Deletes geoloc sharing with a given contact from history and abort/reject any associated
 ongoing session if such exists. | ||||||||||
| void | deleteGeolocSharings() Deletes all geoloc sharing from history and abort/reject any associated ongoing session if
 such exists. | ||||||||||
| void | disconnect() Disconnects from the API
 | ||||||||||
| GeolocSharing | getGeolocSharing(String sharingId) Returns a current geoloc sharing from its unique ID | ||||||||||
| void | removeEventListener(GeolocSharingListener listener) Removes a listener on geoloc sharing events | ||||||||||
| GeolocSharing | shareGeoloc(ContactId contact, Geoloc geoloc) Shares a geolocation with a contact. | ||||||||||
| [Expand] Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|  From class
  com.gsma.services.rcs.RcsService | |||||||||||
|  From class
  java.lang.Object | |||||||||||
Constructor
| ctx | Application context | 
|---|---|
| listener | Service listener | 
Adds a listener on geoloc sharing events
| listener | Listener | 
|---|
| RcsServiceNotAvailableException | |
| RcsGenericException | |
| RcsServiceNotAvailableException | 
Deletes a geoloc sharing by its sharing id from history and abort/reject any associated ongoing session if such exists.
| sharingId | the sharing ID | 
|---|
| RcsServiceNotAvailableException | |
| RcsGenericException | |
| RcsServiceNotAvailableException | 
Deletes geoloc sharing with a given contact from history and abort/reject any associated ongoing session if such exists.
| contact | the remote contact | 
|---|
| RcsServiceNotAvailableException | |
| RcsGenericException | |
| RcsServiceNotAvailableException | 
Deletes all geoloc sharing from history and abort/reject any associated ongoing session if such exists.
| RcsServiceNotAvailableException | |
| RcsGenericException | |
| RcsServiceNotAvailableException | 
Disconnects from the API
Returns a current geoloc sharing from its unique ID
| sharingId | Sharing ID | 
|---|
| RcsServiceNotAvailableException | |
| RcsGenericException | |
| RcsServiceNotAvailableException | 
Removes a listener on geoloc sharing events
| listener | Listener | 
|---|
| RcsServiceNotAvailableException | |
| RcsGenericException | |
| RcsServiceNotAvailableException | 
Shares a geolocation with a contact. An exception if thrown if there is no ongoing CS call. 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 | 
|---|---|
| geoloc | Geolocation info | 
| RcsServiceNotRegisteredException | |
| RcsPersistentStorageException | |
| RcsServiceNotAvailableException | |
| RcsGenericException | |
| RcsGenericException | |
| RcsPersistentStorageException | |
| RcsServiceNotAvailableException | |
| RcsServiceNotRegisteredException |