0

I want to create a small HTML5 app that runs in a browser window. Its purpose is to track my geolocation and the heart rate with Javascript while cycling or running. The screen does not need to stay on (as I don't even want to show a map), the phone just needs to continue collecting location data and not stop the bluetooth connection to the heart rate sensor.

Is this possible with vanilla HTML5? Or do I need something native wrapped around the app? So basically I just want to press a button when I start my tour, and then hit the stop button when I come back. A simple data collector, no fancy GUI neccessary.

I don't have problems with the app itself (using the Generic Sensor and Geolocation API), just with the interruption issues when the phone goes to sleep.

Rob
  • 11,492
  • 14
  • 59
  • 94
  • I don't think it is possible, additionally there are a lot of web browser apps for anoroid, which might have different funclionality – Vladyslav Matviienko Aug 01 '19 at 11:42
  • 1
    you should check out cordova with the insomnia plugin. It is really not best practice to do something like that but this allows you to write your app in js and keep is running in the background. Best way would be a service collecting your data, a webview for display and interaction and a javascript interface to get the data from native to js. – P. Stresow Aug 01 '19 at 11:51
  • @P.Stresow: You're right, using a service would be the most professional and cleanest way. I was just hoping for a quick and easy way that solely relies on HTML5, so apart from using this little tool for myself I could share this with my friends. – Rob Aug 01 '19 at 11:58

0 Answers0