Can a PWA published as an Android app (using bubblewrap) track geolocation when phone screen is closed?

413 Views Asked by At

I'm creating a TWA using bubblewrap out of my PWA. While the app is open, we need to track the users location to notify them when they're near the destination.

Can a PWA wrapped as a TWA, downloaded from Google Play, can still run when the phone screen is off?

1

There are 1 best solutions below

0
On

Short answer is that it's not currently possible.

PWAs wrapped inside a Trusted Web Activity can use any Web Platform APIs available, but don't have access to platform-specific APIs. That said, there isn't a web platform APIs that would allow to tracking the user's location in the background at the moment.