public final class

GeolocSharingService

extends RcsService
java.lang.Object
   ↳ com.gsma.services.rcs.RcsService
     ↳ com.gsma.services.rcs.sharing.geoloc.GeolocSharingService

Class Overview

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.

Summary

[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

Public Constructors

public GeolocSharingService (Context ctx, RcsServiceListener listener)

Constructor

Parameters
ctx Application context
listener Service listener

Public Methods

public void addEventListener (GeolocSharingListener listener)

Adds a listener on geoloc sharing events

Parameters
listener Listener
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public final void connect ()

Connects to the API

public void deleteGeolocSharing (String sharingId)

Deletes a geoloc sharing by its sharing id from history and abort/reject any associated ongoing session if such exists.

Parameters
sharingId the sharing ID
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public void deleteGeolocSharings (ContactId contact)

Deletes geoloc sharing with a given contact from history and abort/reject any associated ongoing session if such exists.

Parameters
contact the remote contact
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public void deleteGeolocSharings ()

Deletes all geoloc sharing from history and abort/reject any associated ongoing session if such exists.

Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public void disconnect ()

Disconnects from the API

public GeolocSharing getGeolocSharing (String sharingId)

Returns a current geoloc sharing from its unique ID

Parameters
sharingId Sharing ID
Returns
  • GeolocSharing Geoloc sharing or null if not found
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public void removeEventListener (GeolocSharingListener listener)

Removes a listener on geoloc sharing events

Parameters
listener Listener
Throws
RcsServiceNotAvailableException
RcsGenericException
RcsServiceNotAvailableException

public GeolocSharing shareGeoloc (ContactId contact, Geoloc geoloc)

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.

Parameters
contact Contact identifier
geoloc Geolocation info
Returns
  • GeolocSharing
Throws
RcsServiceNotRegisteredException
RcsPersistentStorageException
RcsServiceNotAvailableException
RcsGenericException
RcsGenericException
RcsPersistentStorageException
RcsServiceNotAvailableException
RcsServiceNotRegisteredException
See Also