public class VgMySimulatedLocationProvider extends java.lang.Object implements VgMyLocationProvider
Modifier and Type | Field and Description |
---|---|
protected int |
mAccuracy |
protected Activity |
mActivity |
protected java.lang.String |
mFloor |
protected VgMyLayerAndCameraHandler |
mLayerAndCameraHandler |
protected VgMyLocationListener |
mLocationListener |
protected VgPosition |
mPosition |
protected java.util.Timer |
mSimulateTimer |
protected VgMySurfaceView |
mSurfaceView |
Constructor and Description |
---|
VgMySimulatedLocationProvider(Activity pActivity,
VgMySurfaceView pSurfaceView,
VgMyLayerAndCameraHandler pLayerAndCameraHandler) |
Modifier and Type | Method and Description |
---|---|
void |
disable()
Requests provider stops sending location notifications.
|
void |
enable()
Requests provider starts sending location notifications.
|
java.lang.String |
getName()
Returns the name of the provider.
|
boolean |
isEnabled()
Returns true if the provider is enabled.
|
boolean |
isSimulatePositionEnabled() |
static int |
randInt(int min,
int max)
Returns a pseudo-random number between min and max, inclusive.
|
void |
release()
This method should be called when the activity dies to notify that we
should release/unregister all VisioDevKit objects, and null out as much
references on other objects as possible.
|
void |
simulatePosition()
Uses the camera's focal point to generate a position within the focused layer.
|
void |
startSimulatePosition()
Starts a native timer which calls the simulatePosition method.
|
void |
stopSimulatePosition()
Cancels the simulate position timer (if it was enabled).
|
boolean |
supportsAccuracy()
Returns true if the provider supports accuracy updates.
|
boolean |
supportsContext()
Returns true if the provider supports context updates.
|
boolean |
supportsFloor()
Returns true if the provider supports floor updates.
|
boolean |
supportsHeading()
Returns true if the provider supports heading updates.
|
boolean |
supportsPosition()
Returns true if the provider supports position updates.
|
protected java.util.Timer mSimulateTimer
protected int mAccuracy
protected VgMyLocationListener mLocationListener
protected VgMySurfaceView mSurfaceView
protected Activity mActivity
protected VgMyLayerAndCameraHandler mLayerAndCameraHandler
protected java.lang.String mFloor
protected VgPosition mPosition
public VgMySimulatedLocationProvider(Activity pActivity, VgMySurfaceView pSurfaceView, VgMyLayerAndCameraHandler pLayerAndCameraHandler)
public void simulatePosition()
public static int randInt(int min, int max)
Integer.MAX_VALUE - 1
.min
- Minimum valuemax
- Maximum value. Must be greater than min.Random.nextInt(int)
public boolean isSimulatePositionEnabled()
public void startSimulatePosition()
public void stopSimulatePosition()
public java.lang.String getName()
VgMyLocationProvider
getName
in interface VgMyLocationProvider
public void enable()
VgMyLocationProvider
enable
in interface VgMyLocationProvider
public boolean isEnabled()
VgMyLocationProvider
isEnabled
in interface VgMyLocationProvider
public void disable()
VgMyLocationProvider
disable
in interface VgMyLocationProvider
public boolean supportsPosition()
VgMyLocationProvider
supportsPosition
in interface VgMyLocationProvider
public boolean supportsAccuracy()
VgMyLocationProvider
supportsAccuracy
in interface VgMyLocationProvider
public boolean supportsContext()
VgMyLocationProvider
supportsContext
in interface VgMyLocationProvider
public boolean supportsFloor()
VgMyLocationProvider
supportsFloor
in interface VgMyLocationProvider
public boolean supportsHeading()
VgMyLocationProvider
supportsHeading
in interface VgMyLocationProvider
public void release()