Is it possible to have a data Column Showing the current user has the app downloaded / add to home screen?
You can use the following in a JavaScript column:
function getPWADisplayMode() {
const isStandalone = window.matchMedia('(display-mode: standalone)').matches;
if (document.referrer.startsWith('android-app://')) {
return 'twa';
} else if (navigator.standalone || isStandalone) {
return 'standalone';
}
return 'browser';
}
return getPWADisplayMode();
Note that if you want to do any sort of aggregation or reporting on the data, then you’ll need an action somewhere that writes the value returned to a non-computed column.
2 Likes