Do you have a sample Android app I could use for a device demo posting my phone’s accelerometer data to a device attribute?
I did experiment with a native app a long time ago (periodically reporting GPS). It was tough getting a background task to run continuously. Both Android and iOS try very hard to idle your application and I never got it to run past a day or so.
The Experience Page approach will work as long as the browser is open and the phone’s screen is on.
So I would open the experience page containing that code snippet on my phone?
How would that data end up in a device attribute?
Maybe it’s easier to launch a python script in termux and post data via your API?
If you’re comfortable with Python, then that absolutely works.
For the website, I’d do an Ajax callback to an Experience Endpoint with the data. The Endpoint triggers a workflow which uses a Device State node to record the data.