Run script only when the screen is off

Asked

Viewed 32 times

0

Talk guys, I’m trying to automate mobile routines with an app I made and to make it more effective I’m trying to implement a script for it to run whenever the mobile screen is off. For example: if the screen is off > run the script, do all updates + run Antivirus + other functions that the user chooses to automate. If anyone can give me a light, I’d be grateful.

1 answer

1

When it comes to routine device: detect shutdown mode. On android, for example, we have the:

Intent.ACTION_SCREEN_OFF and ACTION_SCREEN_ON

You won’t get anything ONLY with javascript...

Study what is listed below to be able to follow a javascript line / frontend:

  • IONIC
  • React Native

Browser other questions tagged

You are not signed in. Login or sign up in order to post.