Sub Process_Globals
Dim ps As PhoneSensors
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
ps.Initialize(ps.TYPE_PROXIMITY)
ps.StartListening("ps")
End If
End Sub
Sub ps_SensorChanged (Values() As Float)
Log(Values(0))
If Values(0) = 0 Then
Log("Player has hand over phone ..")
Else
Log("Player has removed hand ..")
End If
End Sub