I’m using a WebApp (not referring to a webview), to display data on a large screen. The data itself is irrelevant.
What I need to do is have the WebApp get some data from either the device (Raspberry Pi running Chrome) or the local network, that tells the WebApp something unique about this device that is running the WebApp.
For example, the local IP, or a device ID that I can reference in the WebApp itself. If Push Notifications worked I could use the OneSignal ID. But it doesn’t.
I saw actech’s demo app that gets some device data and IP via AJAX, but that isn’t specific to the device.
The route I would like to have is:
device starts > WebApp runs on chrome > WebApp looks for device specific info > checks with database > displays data relevant to that device.
The thing is, because it’s all remote I can’t just set it up again if the power goes off etc. which is why I need the device to identify itself, without human interaction.
If it was running as an app i.e. on a mobile there would be no problem, I could use OneSignal or just ensure persistent storage, or both.
But with a WebApp, it has to survive power failures and reboots. Which this does not.
I tried putting the WebApp in an iframe and getting the parent URL using a webview (and JS), and having the iframe set to
unsafe-url, but that doesn’t work.
I also can’t use
ThunkableWebviewerExtension.postMessage to post into an iframe from the host page. the postMessage has to be within a webview already in the WebApp, which is not what I need.
Basically; is there anyway to get external device or local information into the app?