2017년 7월 12일 수요일

fall detection


want to make an app that says something after the phone has fallen, just to notify the user. for this i used accelerometer and also tried other accelerometer tutorials. what i noticed is that in all these tutorials and my app the text to speech thing keeps speaking the line again and again depending directly on the intensity of falling/shaking the phone. is it because the accelerometer may be keeps moving/vibrating even when the phone has stopped moving? can i expect this problem to be different with different phones due to their different accelerometers? can there be a solution where the text-to-speech thing speaks only once?

--
Could you use a boolean variable, set it to true initially.

If boolean is true (
// Play speaking sound //
Set boolean to false
)

--
Be aware that your app won't work, when the device is sleeping or your app isn't open.
App Inventor cannot run in the backround.
So if your device falls from the table and you haven't opened your app and kept the device awakw it will say nothing.

--

댓글 없음:

댓글 쓰기