Package com.pointrlabs.core.management
Interface LocationSharingManager
-
- All Implemented Interfaces:
-
com.pointrlabs.core.management.interfaces.Advertiser
public interface LocationSharingManager implements Advertiser<T>
Main class for location sharing management
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interface
LocationSharingManager.Listener
-
Method Summary
Modifier and Type Method Description abstract void
setExternalUserId(String userId)
Sets the user id that will be visible to other users partaking in location sharing abstract void
startSharingSession(String alias, long durationInSeconds, SessionSharingCallback callback, LocationSharingNotificationType notificationType, LocationSharingDirection direction, List<String> recipients)
Starts location sharing session abstract void
stopSharingSession(String token)
Stops sharing session with the given token abstract void
subscribe(String token, String alias, LocationSharingPeerType peerType)
Subscribes to location sharing token The only time token is necessary is if the peerType is Group. abstract void
unsubscribe(String token, LocationSharingPeerType type)
Unsubscribes from token. abstract void
getLocations(LocationSharingPeerType peerType, long maxAgeInSeconds, GetLocationsCallback getLocationsCallback)
Gets the locations of the subscribed peerType abstract void
getAssets(GetAssetsCallback getAssetsCallback, long maxAgeInSeconds)
Gets the assets abstract void
getAssetLocations(String assetIdentifier, long maxAgeInSeconds, GetLocationsCallback getLocationsCallback)
Gets the location of the asset with the given identifier abstract void
getSubscribers(GetSubscribersCallback subscribersFromCppCallback)
Returns the subscribers to the user from the callback -
-
Method Detail
-
setExternalUserId
abstract void setExternalUserId(String userId)
Sets the user id that will be visible to other users partaking in location sharing
-
startSharingSession
abstract void startSharingSession(String alias, long durationInSeconds, SessionSharingCallback callback, LocationSharingNotificationType notificationType, LocationSharingDirection direction, List<String> recipients)
Starts location sharing session
- Parameters:
alias
- name of sharing partydurationInSeconds
- token validity durationcallback
- callback to session sharing resultnotificationType
- location share notification typedirection
- sharing directionrecipients
- shared location receivers
-
stopSharingSession
abstract void stopSharingSession(String token)
Stops sharing session with the given token
-
subscribe
abstract void subscribe(String token, String alias, LocationSharingPeerType peerType)
Subscribes to location sharing token The only time token is necessary is if the peerType is Group. Else it automatically subscribes to wanted peertypes
- Parameters:
token
- This is the token to subscribe toalias
- This will be the alias set for the current session of location sharingpeerType
- This can be Group(1), Geofence(2), All(3)
-
unsubscribe
abstract void unsubscribe(String token, LocationSharingPeerType type)
Unsubscribes from token. If the LocationSharingPeerType is Group, token is necessary or else any argument can be given as token and it will unsubscribe from the location sharing session
- Parameters:
token
- This is the token to unsubscribe fromtype
- This can be Group(1), Geofence(2), All(3)
-
getLocations
abstract void getLocations(LocationSharingPeerType peerType, long maxAgeInSeconds, GetLocationsCallback getLocationsCallback)
Gets the locations of the subscribed peerType
- Parameters:
peerType
- This can be Group(1), Geofence(2), All(3)maxAgeInSeconds
- Specifies the range of time to acquire the positions (e.getLocationsCallback
- Callback that returns a list of OnlineLocation objects
-
getAssets
abstract void getAssets(GetAssetsCallback getAssetsCallback, long maxAgeInSeconds)
Gets the assets
- Parameters:
getAssetsCallback
- Callback that returns a list of Identifier pairs corresponding to assetsmaxAgeInSeconds
- Specifies the range of time to acquire the assets (e.
-
getAssetLocations
abstract void getAssetLocations(String assetIdentifier, long maxAgeInSeconds, GetLocationsCallback getLocationsCallback)
Gets the location of the asset with the given identifier
- Parameters:
assetIdentifier
- The identifier of the asset
-
getSubscribers
abstract void getSubscribers(GetSubscribersCallback subscribersFromCppCallback)
Returns the subscribers to the user from the callback
- Parameters:
subscribersFromCppCallback
- Callback that returns a list of LocationSharingSubscriberData
-
-
-
-