1

I'm looking for an way for an Android phone to record (preferably locally on the device) its GPS position (10-20m accuracy) with a pretty high frequency (e.g. every minute or every 30secs) but ONLY during pre-set time windows, e.g. weekdays between 7:30-8:00 and 13:15-13:45. The rest of the time I want it to do nothing and use no resources.

3
  • Is your phone rooted? To stop it an app from using resources will require the phone being rooted if I am not mistaken. Sep 16, 2019 at 12:11
  • Not rooted and I don't want to. But by "no resources" I didn't mean "absolutely zero". If it hardly uses any battery or mobile data while inactive, I'm happy. Sep 16, 2019 at 12:16
  • 1
    You can try a combination of automation and this app Sep 16, 2019 at 12:31

1 Answer 1

0

You can use a combination of Macrodroid and GPS logger for Android to automate the logging process.

Step 1: install apps and configure GPS logger

  1. Install GPS logger for Android and Macrodroid.
  2. Open GPS logger. Give the necessary permissions. Tap the menu, then General options. Select Start app on launch.

Step 2: macro to launch the app

  1. Start Macrodroid, click on Add macro.

  2. In the Triggers tab, select Date/time trigger. Set the day(s) and time when it should run. Click ok.

  3. In the Actions tab, in the Applications section, select Launch application, select GPS logger. Select Exclude from recent apps.

  4. In the Actions tab, in the Device actions section, select Press back, give the appropriate permission, go back select Press back.

  5. Save the macro and give it a name. It will look like the image below.

Step 3: macro to stop the app

  1. Still using Macrodroid, click on Add macro.

  2. In the Triggers tab, select Date/time trigger. Set the day(s) and time when the macro should run and stop the app. Click ok.

  3. In the Actions tab, in the Applications section, select Launch application, select GPS logger. Select Exclude from recent apps.

  4. In the Actions tab, in the Macrodroid specific section, select Wait before next action, set it to 2-3 seconds.

  5. In the Actions tab, in the Applications section, select UI interaction. Give the appropriate permission Go back select UI interaction, select Identify in app. Open GPS logger, click the Macrodroid UI notifications on the status bar, then click the Stop logging button of GPS logger.

  6. In the Actions tab, in the Device actions section, select Press back.

  7. In the Actions tab, Applications section, select Kill background process, select GPS logger.

  8. In the Constraints tab, in Device state section, select Application running, give the appropriate permission. Go back to the macro, select Application running, select Alive in background

  9. Save the macro and give it a name. It will look like the image below.

The first macro starts the app at the selected days and time while the second stops it by pressing the Stop logging button, then kill it from running in the background at the selected days and time. Make sure that in step 5 of the second macro, Stop logging is selected and not Start logging. If when selecting Stop logging, Start logging is instead selected, then select Start logging instead of Start logging.

1
  • @esQmo_ Ton assomption est correcte. Sep 19, 2019 at 3:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .