Run app in background, that fires an alarm whenever phone is shaking

So I am making a small alert app that fires an alarm whenever phone is shaking. Is there anyway to let the app run even when you close the app or the phone is off? Thank you

Try the itoo extension for this

Guidelines for using Itoo

  • First get your background functionality running in the foreground. Like this, you can find errors much easier. And as soon as you got it working in the foreground, then test it in the background.
  • Read the complete Itoo to leaarn how Itoo works and try the example projects, See also the battery checker tutorial and notification listener and itoo tutorial .
  • Do not use global variables while in the background, use local variables instead
  • Do not use any user-visible or UI components in the background
  • In the background, use the Itoo StoreProperty/FetchProperty methods rather than TinyDB. TinyDB relies on SharedPreferences which will not ensure data synchronization across background processes.

Taifun

1 Like

Ok thank you so much! I'll try it and send updates thanks again

here is a small test project to get you started
after shaking, a voice tells you how many times you already shaked

shakeIt.aia (69.6 KB)

Taifun

3 Likes