Steps for implementing a custom position tracker
To implement a custom position tracker, the basic set of operations that an application must perform are as follows:
Create an instance of
PSTrackerInterface. In your code, use this instance to implement required actions:
createInstance(),
deleteAllInstances(),
deleteInstance(),
positionExternallyReset(),
positionExternallyUpdated(). At runtime, the position service manager will use this interface object to communicate with your custom position tracker. See
Actions custom trackers must implement.
Use
PSTrackerFactory to register your custom tracker with the position service manager. When you register your custom position tracker one of the arguments you specify is the
PSInterface object that you used to implement the required actions. Registering your custom position tracker returns an instance of
PSTrackerManagerInterface. Your custom position tracker uses this object to communicate with the posistion service manager. See
Registering custom position trackers.
After you successfully register a custom position tracker, your application can subscribe to it by creating an instance of PSInterface and calling one of the subscribe actions in the same way as when using a default position tracker. When a new subscription to your custom tracker is requested the position service manager calls the createInstance() action that you defined in the PSTrackerInterface object that you specified when you registered your custom tracker.
With a subscription to your custom tracker in place, your application can execute the same PSInterface actions it can execute when it uses one of the default position trackers.