com.qualcommlabs.usercontext
Interface ContextPlaceConnector

All Superinterfaces:
com.qualcommlabs.usercontext.ConnectorPermissionChangeNotifier, com.qualcommlabs.usercontext.ContextPlaceEventNotifier, com.qualcommlabs.usercontext.ContextPlaceNotifier

public interface ContextPlaceConnector
extends com.qualcommlabs.usercontext.ContextPlaceEventNotifier, com.qualcommlabs.usercontext.ContextPlaceNotifier, com.qualcommlabs.usercontext.ConnectorPermissionChangeNotifier

The Interface ContextPlaceConnector allows applications to manage private places created through a user's interaction with the application, retrieve organization places defined by an organization through the Campaign Manage web console and retrieve a list of the latest place events.


Method Summary
 void addPlaceMonitorFilter(com.qualcommlabs.usercontext.ContextPlaceMonitoringFilter placeMonitorFilter)
          Adds place monitor filter.
 void allOrganizationPlaces(com.qualcommlabs.usercontext.Callback<List<com.qualcommlabs.usercontext.protocol.Place>> serviceCallback)
          Invoke this method to retrieve a list of all organization places created by and for your organization via the Campaign Manager web console.
 void allPlaces(com.qualcommlabs.usercontext.Callback<List<com.qualcommlabs.usercontext.protocol.Place>> serviceCallback)
          Invoke this method in order to retrieve all the places created by your application.
 void allPrivatePointsOfInterest(com.qualcommlabs.usercontext.Callback<List<com.qualcommlabs.usercontext.protocol.PrivatePointOfInterest>> serviceCallback)
          Invoke this method to retrieve a list of all private points of interest.
 void createPlace(com.qualcommlabs.usercontext.protocol.Place place, com.qualcommlabs.usercontext.Callback<com.qualcommlabs.usercontext.protocol.Place> serviceCallback)
          Invoke this method in order to create place specific to your application.
 void deletePlace(Long placeId, com.qualcommlabs.usercontext.Callback<Void> serviceCallback)
          Invoke this method to delete a place that was created by your application.
 void dontMonitorPlacesInBackground()
          Sets whether to monitor locations while the app is in the background.
 void dontMonitorPlacesWhenAllowed()
          Disables place monitoring even if the user permission allows it.
 boolean isBackgroundPermissionEnabled()
          Returns whether the user has enabled or disabled location monitoring while the app isn't in the foreground inthe Privacy Settings.
 boolean isMonitoringPlacesInBackground()
          Checks whether your app is requesting location monitoring in the background.
 boolean isMonitoringPlacesWhenAllowed()
          Returns whether places will be monitored for entry and exit IF the user allows it with their permission setting.
 boolean isPermissionEnabled()
          Returns whether the user has enabled or disabled location monitoring in the Privacy Settings.
 void monitorPlacesInBackground()
          Sets whether to monitor locations while the app is in the background.
 void monitorPlacesWhenAllowed()
          Sets place monitoring to be on when the user permission setting is also on.
 void removePlaceMonitorFilter(com.qualcommlabs.usercontext.ContextPlaceMonitoringFilter placeMonitorFilter)
          Removes place monitor filter.
 void requestLatestPlaceEvents(com.qualcommlabs.usercontext.Callback<List<com.qualcommlabs.usercontext.protocol.PlaceEvent>> serviceCallback)
          Deprecated. 
 void setPerformanceLevel(PlacePerformanceLevel placePerformanceLevel)
          The default value for this property should suffice for most applications.
 void updatePlace(com.qualcommlabs.usercontext.protocol.Place place, com.qualcommlabs.usercontext.Callback<com.qualcommlabs.usercontext.protocol.Place> serviceCallback)
          Invoke this method to update a place that was created by your application.
 
Methods inherited from interface com.qualcommlabs.usercontext.ContextPlaceEventNotifier
addPlaceEventListener, removePlaceEventListener
 
Methods inherited from interface com.qualcommlabs.usercontext.ContextPlaceNotifier
addPlaceListener, removePlaceListener
 
Methods inherited from interface com.qualcommlabs.usercontext.ConnectorPermissionChangeNotifier
addConnectorPermissionChangeListener, removeConnectorPermissionChangeListener
 

Method Detail

isPermissionEnabled

boolean isPermissionEnabled()
Returns whether the user has enabled or disabled location monitoring in the Privacy Settings.


isBackgroundPermissionEnabled

boolean isBackgroundPermissionEnabled()
Returns whether the user has enabled or disabled location monitoring while the app isn't in the foreground inthe Privacy Settings. For proper operation of this behavior, your activities must call ContextCoreConnector.setCurrentActivity() in their onResume() and onPause() methods.


requestLatestPlaceEvents

@Deprecated
void requestLatestPlaceEvents(com.qualcommlabs.usercontext.Callback<List<com.qualcommlabs.usercontext.protocol.PlaceEvent>> serviceCallback)
Deprecated. 

Parameters:
serviceCallback - the service callback

allPlaces

void allPlaces(com.qualcommlabs.usercontext.Callback<List<com.qualcommlabs.usercontext.protocol.Place>> serviceCallback)
Invoke this method in order to retrieve all the places created by your application.

Parameters:
serviceCallback - the service callback

createPlace

void createPlace(com.qualcommlabs.usercontext.protocol.Place place,
                 com.qualcommlabs.usercontext.Callback<com.qualcommlabs.usercontext.protocol.Place> serviceCallback)
Invoke this method in order to create place specific to your application. Create places, to alert your application when users enter or leave the place.

Parameters:
place - the place
serviceCallback - the service callback

updatePlace

void updatePlace(com.qualcommlabs.usercontext.protocol.Place place,
                 com.qualcommlabs.usercontext.Callback<com.qualcommlabs.usercontext.protocol.Place> serviceCallback)
Invoke this method to update a place that was created by your application.

Parameters:
place - the place
serviceCallback - the service callback

deletePlace

void deletePlace(Long placeId,
                 com.qualcommlabs.usercontext.Callback<Void> serviceCallback)
Invoke this method to delete a place that was created by your application.

Parameters:
placeId - the place id
serviceCallback - the service callback

allOrganizationPlaces

void allOrganizationPlaces(com.qualcommlabs.usercontext.Callback<List<com.qualcommlabs.usercontext.protocol.Place>> serviceCallback)
Invoke this method to retrieve a list of all organization places created by and for your organization via the Campaign Manager web console.

Parameters:
serviceCallback - the service callback

allPrivatePointsOfInterest

void allPrivatePointsOfInterest(com.qualcommlabs.usercontext.Callback<List<com.qualcommlabs.usercontext.protocol.PrivatePointOfInterest>> serviceCallback)
Invoke this method to retrieve a list of all private points of interest.

Parameters:
serviceCallback - the service callback

setPerformanceLevel

void setPerformanceLevel(PlacePerformanceLevel placePerformanceLevel)
The default value for this property should suffice for most applications. Only set this value to higher battery consumption levels for specific and preferably short periods of time. Otherwise your application will drain the battery more rapidly.

Parameters:
placePerformanceLevel -

isMonitoringPlacesWhenAllowed

boolean isMonitoringPlacesWhenAllowed()
Returns whether places will be monitored for entry and exit IF the user allows it with their permission setting. If this returns true, but the user permission is off, places will not be monitored.

Returns:
app level monitoring state - not user level

monitorPlacesWhenAllowed

void monitorPlacesWhenAllowed()
Sets place monitoring to be on when the user permission setting is also on. If the user permission is off and this setting is enabled, places will start being monitored when the user sets the permission on. If the user permission is on, this will cause places monitoring to be active. If the user subsequently turns the permission off, place monitoring will be disabled but this setting will be maintained for when the user turns the permission back on.


dontMonitorPlacesWhenAllowed

void dontMonitorPlacesWhenAllowed()
Disables place monitoring even if the user permission allows it.


monitorPlacesInBackground

void monitorPlacesInBackground()
Sets whether to monitor locations while the app is in the background. Both this and the user permission must be set for background location to be enabled. It is critical that your Activities call the ContextCoreConnector.setCurrentActivity() method in their onResume() and onPause() methods for proper behavior.


dontMonitorPlacesInBackground

void dontMonitorPlacesInBackground()
Sets whether to monitor locations while the app is in the background. Both this and the user permission must be set for background location to be enabled. It is critical that your Activities call the ContextCoreConnector.setCurrentActivity() method in their onResume() and onPause() methods for proper behavior.


isMonitoringPlacesInBackground

boolean isMonitoringPlacesInBackground()
Checks whether your app is requesting location monitoring in the background.

Returns:
true if your app wants location monitoring to be enabled while the app is in the background. Both this and the user permission must be set for background location to be enabled

addPlaceMonitorFilter

void addPlaceMonitorFilter(com.qualcommlabs.usercontext.ContextPlaceMonitoringFilter placeMonitorFilter)
Adds place monitor filter.

Parameters:
placeMonitorFilter -

removePlaceMonitorFilter

void removePlaceMonitorFilter(com.qualcommlabs.usercontext.ContextPlaceMonitoringFilter placeMonitorFilter)
Removes place monitor filter.

Parameters:
placeMonitorFilter -


Copyright © 2014 Qualcomm Retail Solutions, Inc.. All Rights Reserved.