i'm trying to use shake event in my app with code from your example http://www.b4x.com/forum/basic4android-getting-started-tutorials/9857-android-shake-event-phonesensors.html#post54631
but the event "Shaked" is released too speed and not wait for 1.5 seconds configured in TimeThreshold on shake module:
how can i wait for "n" seconds between a "shaked" event and another?
thanks
but the event "Shaked" is released too speed and not wait for 1.5 seconds configured in TimeThreshold on shake module:
B4X:
Sub Process_Globals
Dim tw As TextWriter
Dim recording As Boolean
Type AxisData (flipCount As Int, lastPeak As Float,lastValue As Float, timeStamp As Long)
Dim AxisX As AxisData
Dim MagnitudeThreshold As Float
Dim TimeThreshold As Int
MagnitudeThreshold = 11
TimeThreshold = 1500 'milliseconds <<<<<<<<<<<<<<<<<<<<
Dim CallBackActivity As String
End Sub
B4X:
Sub Shaked
PlayRandom
End Sub
how can i wait for "n" seconds between a "shaked" event and another?
thanks
Last edited: