Class Pointr
-
- All Implemented Interfaces:
-
com.pointrlabs.core.management.interfaces.Advertiser
public class Pointr extends PTRAdvertiserImpl<T>
Entry class for Pointr SDK. For Pointr SDK to work properly, please take the following steps Initialize the Pointr instance with with at the earliest possible time. Advised place to perform this is onCreate method
To start to use the SDK manager, you have to start the sdk and make sure it's running. To start the SDK @see start To listen the Pointr SDK progress updates
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enum
Pointr.State
The enum Pointr state.
-
Field Summary
Fields Modifier and Type Field Description public Pointr.State
state
public final PermissionManager
permissionManager
public static PerformanceManager
performanceManager
public final FeatureTypeCoordinator
featureTypeCoordinator
public final KeyValueStore
keyValueStore
public final ConfigurationManager
configurationManager
public final LocationSharingManager
locationSharingManager
public final PoiManager
poiManager
public final GeofenceManager
geofenceManager
public final UserManager
userManager
public final DataManager
dataManager
public final PathManager
pathManager
public final AnalyticsManager
analyticsManager
public final PositionManager
positionManager
public final SiteManager
siteManager
public final ObstacleManager
obstacleManager
public final GraphManager
graphManager
public final PointrDebug
pointrDebug
public final Object
lock
-
Method Summary
Modifier and Type Method Description Pointr.State
getState()
PermissionManager
getPermissionManager()
static PerformanceManager
getPerformanceManager()
Gets performance manager. FeatureTypeCoordinator
getFeatureTypeCoordinator()
Gets Feature Type Coordinator. KeyValueStore
getKeyValueStore()
ConfigurationManager
getConfigurationManager()
LocationSharingManager
getLocationSharingManager()
Gets location sharing manager. PoiManager
getPoiManager()
Gets poi manager. GeofenceManager
getGeofenceManager()
Gets geofence manager. UserManager
getUserManager()
Gets user manager. DataManager
getDataManager()
Gets data manager. PathManager
getPathManager()
Gets path manager. AnalyticsManager
getAnalyticsManager()
Get AnalyticsManager synchronized PositionManager
getPositionManager()
Gets position manager. synchronized SiteManager
getSiteManager()
Gets Site Site Manager. ObstacleManager
getObstacleManager()
Get ObstacleManager GraphManager
getGraphManager()
Get GraphManager synchronized PointrDebug
getPointrDebug()
Gets PointrDebug. static Pointr
getPointr()
Gets pointr instance. static void
resetPointrInstance()
static Pointr
with(@NonNull() Context context, PTRParams ptrParams)
Initialize the Pointr SDK static String
getSystemLanguageCode(Context context)
Get systems locale string based on context static Locale
getSystemLocale(@NonNull() Context context)
Gets system locale based on context static String
getVersionName()
Feature
getMyCarFeature()
Get the feature that represents the location of the user's car void
setMyCarFeature(@Nullable() Feature feature)
Set the feature that represents the location of the user's car Setting this to null will clear the location LocationAware
getLocation(String name)
Get the location with the given storage name void
saveLocation(String name, @Nullable() LocationAware locationAware)
Save the location with the given storage name Setting locationAware to null will clear the location void
clearLocation(String name)
Clear the location with the given storage name void
startRecorder()
This is a method that starts the Pointr Recorder for debugging the beacon environment void
stopRecorder()
This is a method that stops the Pointr Recorder after it was started for debuggin the beacon environment. synchronized void
start()
Starts the Pointr SDK synchronized void
startAsForegroundService(@NonNull() PointrServiceParams pointrServiceParams, boolean shouldKeepCpuOn)
Starts pointr as foreground service. synchronized void
stopForegroundService()
Stops the foreground service. synchronized void
stop()
Stops the pointr managers boolean
waitUntil(@NonNull() Set<Integer> sites, @NonNull() Set<DataType> dataTypes, double timeoutInSeconds)
Blocks until all selected types for set sites are available. -
Methods inherited from class com.pointrlabs.core.util.PTRAdvertiserImpl
addListener, advertise, getListeners, getLock, isListenersEmpty, removeAllListeners, removeListener, setListeners
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getState
Pointr.State getState()
-
getPermissionManager
@Nullable() PermissionManager getPermissionManager()
- Returns:
ConfigurationManager instance
-
getPerformanceManager
@NonNull() static PerformanceManager getPerformanceManager()
Gets performance manager. Only for internal use. NOT FOR CLIENT USE!
- Returns:
the performance manager
-
getFeatureTypeCoordinator
@Nullable() FeatureTypeCoordinator getFeatureTypeCoordinator()
Gets Feature Type Coordinator. Retrieves feature types and related attributes from cpp
- Returns:
FeatureTypeCoordinator instance
-
getKeyValueStore
@NonNull() KeyValueStore getKeyValueStore()
- Returns:
KeyValueStore instance
-
getConfigurationManager
@Nullable() ConfigurationManager getConfigurationManager()
- Returns:
ConfigurationManager instance
-
getLocationSharingManager
@Nullable() LocationSharingManager getLocationSharingManager()
Gets location sharing manager.
- Returns:
the location sharing manager
-
getPoiManager
@Nullable() PoiManager getPoiManager()
Gets poi manager.
- Returns:
the poi manager
-
getGeofenceManager
@Nullable() GeofenceManager getGeofenceManager()
Gets geofence manager.
- Returns:
the geofence manager
-
getUserManager
@Nullable() UserManager getUserManager()
Gets user manager.
- Returns:
the user manager
-
getDataManager
@Nullable() DataManager getDataManager()
Gets data manager.
- Returns:
the data manager
-
getPathManager
@Nullable() PathManager getPathManager()
Gets path manager.
- Returns:
the path manager
-
getAnalyticsManager
AnalyticsManager getAnalyticsManager()
Get AnalyticsManager
- Returns:
AnalyticsManager instance
-
getPositionManager
@Nullable() synchronized PositionManager getPositionManager()
Gets position manager.
- Returns:
the position manager
-
getSiteManager
@Nullable() synchronized SiteManager getSiteManager()
Gets Site Site Manager.
- Returns:
Site Manager instance
-
getObstacleManager
ObstacleManager getObstacleManager()
Get ObstacleManager
- Returns:
ObstacleManager instance
-
getGraphManager
GraphManager getGraphManager()
Get GraphManager
- Returns:
GraphManager instance
-
getPointrDebug
@Nullable() synchronized PointrDebug getPointrDebug()
Gets PointrDebug.
- Returns:
the Pointr Debug class
-
resetPointrInstance
static void resetPointrInstance()
-
with
static Pointr with(@NonNull() Context context, PTRParams ptrParams)
Initialize the Pointr SDK
- Parameters:
context
- the application contextptrParams
- parameters required for initializing Pointr PTRParams
-
getSystemLanguageCode
static String getSystemLanguageCode(Context context)
Get systems locale string based on context
- Parameters:
context
- Activity or Application context- Returns:
Locale string
-
getSystemLocale
static Locale getSystemLocale(@NonNull() Context context)
Gets system locale based on context
- Returns:
System Locale
-
getVersionName
static String getVersionName()
-
getMyCarFeature
@Nullable() Feature getMyCarFeature()
Get the feature that represents the location of the user's car
- Returns:
the feature representing the location of the user's car
-
setMyCarFeature
void setMyCarFeature(@Nullable() Feature feature)
Set the feature that represents the location of the user's car
Setting this to null will clear the location
- Parameters:
feature
- the feature representing the location of the user's car
-
getLocation
@Nullable() LocationAware getLocation(String name)
Get the location with the given storage name
-
saveLocation
void saveLocation(String name, @Nullable() LocationAware locationAware)
Save the location with the given storage name
Setting locationAware to null will clear the location
-
clearLocation
void clearLocation(String name)
Clear the location with the given storage name
-
startRecorder
void startRecorder()
This is a method that starts the Pointr Recorder for debugging the beacon environment
-
stopRecorder
void stopRecorder()
This is a method that stops the Pointr Recorder after it was started for debuggin the beacon environment.
-
start
synchronized void start()
Starts the Pointr SDK
-
startAsForegroundService
synchronized void startAsForegroundService(@NonNull() PointrServiceParams pointrServiceParams, boolean shouldKeepCpuOn)
Starts pointr as foreground service. You can provide the parameters to be used while displaying the notification
- Parameters:
pointrServiceParams
- to define the content for the notification displayed in foreground serviceshouldKeepCpuOn
- to decide whether to acquire a wake lock to keep CPU on
-
stopForegroundService
synchronized void stopForegroundService()
Stops the foreground service.
-
stop
synchronized void stop()
Stops the pointr managers
-
-
-
-