Running the app in background

I want to run an app that records current geographic location every 15 mins. But usually a phone/computer go sleep or the user opens other apps/window
that stop the app doing the recoding.
is there a way to keep the app running (execute the “every 15 mins” task) even in the background?


1 Like

It might work if you wrap the app with the BDK native. Search “GPS” in the documentation Notion – The all-in-one workspace for your notes, tasks, wikis, and databases.

  1. we can use “current geographic position” to get location, no need to use BDK’s GPS.
  2. the problem is that my app’s “do every X seconds to get GPS location” workflow won’t work when the device goes to sleep…
1 Like

I’ve just quickly tested the GPS location with the BDK. Unfortunately the situation is the same - when the device is locked - the workflow that detects the location is not running . When the device is unlocked and app is running in the background - the GPS location is detected.

1 Like

Did you ever figure out if this could be done?

no. busy on something else…

On android there are permissions to allow a app to run in background. Not sure how to have your app request such permissions though…

Enabling Background App Refresh with the BDK wrapper allows the app to pick up where it left off but doesn’t keep the “run every 30 seconds and update position” workflow active in the background. It’s as if the workflow gets paused or disconnected.

Not famillar with that wrapper but is enabling that actually get permissions from the phone itself?

Yeah, it does. When you enable it through the BDK wrapper, it pops up a native permission request just like any other app. You can also tweak these permissions later in the phone settings for the app.

1 Like