-
- All Implemented Interfaces:
-
android.hardware.SensorEventListener
public class DeviceCoordinate implements SensorEventListener
-
-
Method Summary
Modifier and Type Method Description static DeviceCoordinategetInstance(Context context)Using Singleton pattern here booleangetGyroscopeSupport()Get the Device support gyroscope technology voidstart()Start getting device gyroscope logs using ACCELEROMETER sensor voidstop()stop getting logs from ACCELEROMETER sensor static StringgetDeviceOrientation(Context context)Get the Device orientationPORTRAIT or LANDSCAPE voidonSensorChanged(SensorEvent sensorEvent)voidonAccuracyChanged(Sensor sensor, int i)-
-
Method Detail
-
getInstance
static DeviceCoordinate getInstance(Context context)
Using Singleton pattern here
- Parameters:
context- as para
-
getGyroscopeSupport
boolean getGyroscopeSupport()
Get the Device support gyroscope technology
-
start
void start()
Start getting device gyroscope logs using ACCELEROMETER sensor
-
stop
void stop()
stop getting logs from ACCELEROMETER sensor
-
getDeviceOrientation
static String getDeviceOrientation(Context context)
Get the Device orientationPORTRAIT or LANDSCAPE
- Parameters:
context- as request
-
onSensorChanged
void onSensorChanged(SensorEvent sensorEvent)
-
onAccuracyChanged
void onAccuracyChanged(Sensor sensor, int i)
-
-
-
-