Here is my simple implementation.
The MapFragment is already initialized. If I do the simulation mode the position indicator is showing but if I switched to the actual TBT navigation it is not showing where I am located.
PositionManager positioningManager;
if(positioningManager == null) {
positioningManager = PositioningManager.getInstance();
positioningManager.addListener(new WeakReference<>(positionChangedListener));
positioningManager.start(PositioningManager.LocationMethod.GPS_NETWORK);
}
positionIndicator = mMap.getPositionIndicator();
positionIndicator.setVisible(true);
positionIndicator.setAccuracyIndicatorVisible(true);
private PositioningManager.OnPositionChangedListener positionChangedListener =
new PositioningManager.OnPositionChangedListener() {
@Override
public void onPositionUpdated(PositioningManager.LocationMethod locationMethod,
GeoPosition geoPosition, boolean b) {
Log.d(TAG, "onPositionUpdated " + locationMethod.name());
Log.d(TAG, "Coordinates " +geoPosition.getCoordinate());
}
@Override
public void onPositionFixChanged(PositioningManager.LocationMethod locationMethod,
PositioningManager.LocationStatus locationStatus) {
Log.d(TAG, "onPositionFixChanged " + locationMethod.name() + " status " + locationStatus.name());
}
};