Request Extension : Detect when phone comes to a complete stop

looking for a developer to make a extension that will detect when the phone
comes to a complete stop no matter the orientation and report quickly .

Welcome back to :kodular:odular,…
Are you looking for any paid extension developer? If not then may you not be helped…
Why not to learn develope extension yourself?.. As offcourse we are here to learn…

  • Technical_zone :sunglasses:

yes i dont care who it is .

did you already try the accelerometer sensor together with some threshold?

for example in the AccelerationChanged event:

if abs(xAccel) < 0.1 AND abs(yAccel) < 0.1 AND abs(zAccel) < 0.1 
then "phone came to a complete stop"

see also this similar example App Inventor Code Snippets | Pura Vida Apps


1 Like

I’m assuming this is java or something . I only know how to use kodular building blocks .
That’s why I asked for someone to build a extension . I could not find a way to do it with the blocks that was fast and 100% accurate with rather low CPU usage .

What @Taifun suggested to try is

from what i understand it wont work

the value keeps changing even if the phone is laying on a table .

i have tried this . and get nothing …

you can see this in this sample

here is sample code
testaccel.aia (17.4 KB)

depending on how the phone is layed the numbers are greatly different .

which is why i was asking for someone to build a extension .

now i have tried using the gyroscope sensor . and it seem to be based off velocity
buts its way to sensitive and reacts with bell at the slightest pause …


i only want it to make a alert when its stopped for more than 500ms

i see the gyroscope sensor has a timestamp feature but im not sure if this
could somehow be used to detect how long it remained stopped .

any help ?

You can use clock component. Set time interval to 500ms. If conditions are met set clock enabled to true when clock timer show alert

i cant seem to figure it out … all i do with the clock is overload my phone and cause it to lock up …

heres hoping someone can make a extension … ill pay …

No, this is called pseudo code…
@dora_paz solution is almost correct, the only thing which is missing are the abs blocks… a value can be positive or negative, therefore you have to check for the absolute value of the 3 accel parameters…

You can find the abs block in the Maths drawer