I used the sample program from online help files.
Devices I tried:
LG G4
Nexus 5
Samsung Tab A 2016 LTE
Samsung Tab S 10.5 Wifi
rem AGK Application 2017.01.09
rem MR
SetWindowSize(800,600,0)
SetVirtualResolution(90,160)
SetPrintSize(5)
StartGPSTracking()
do
Print("(Touch for Exit/End)")
Print("All Sensors:")
Print("Accel")
Value("X",GetRawAccelX())
Value("Y",GetRawAccelY())
Value("Z",GetRawAccelZ())
Print("Gyro Velocity")
Value("X",GetRawGyroVelocityX())
Value("Y",GetRawGyroVelocityY())
Value("Z",GetRawGyroVelocityZ())
Print("Magnetic")
Value("X",GetRawMagneticX())
Value("Y",GetRawMagneticY())
Value("Z",GetRawMagneticZ())
Print("Rotation")
Value("X",GetRawRotationVectorX())
Value("Y",GetRawRotationVectorY())
Value("Z",GetRawRotationVectorZ())
Value("W",GetRawRotationVectorW())
Value("X2",GetRawRotationVectorX2())
Value("Y2",GetRawRotationVectorY2())
Value("Z2",GetRawRotationVectorZ2())
Value("W2",GetRawRotationVectorW2())
Print("GPS")
Value("Longitude",GetRawGPSLongitude()) //Längengrad um die Erde herum
Value("Latitude",GetRawGPSLatitude())
Value("Altitude",GetRawGPSAltitude())
Print("---")
Value("Light Level",GetRawLightLevel()) //5 room with less light, under lamp 2500+ , little lamp ~150
Value("Proximity Distance",GetRawProximityDistance()) //3 if hand over until 100, at start it is 0
if GetRawProximityDistance()>0 and GetRawProximityDistance()<50
SetPrintColor(128,128,128) //Hand on Device
else
SetPrintColor(255,255,255)
endif
if 1 = 1
local g as float
g = GetRawLightLevel()
if g > 1000 then g = 1000 //max light level
g = g / 1000 //make it 0 to 1
g = g * 255 //scale it 0 to 255
SetClearColor(0,0,g)
endif
if GetPointerPressed()
exit
endif
Sync()
loop
StopGPSTracking()
end
Function Value(t as string,f as float)
Print(t+" "+str(f))
EndFunction