How to fetch device information from a progressive web app

守給你的承諾、 提交于 2019-11-27 03:36:16

问题


How to fetch device information (Google Advertising Id or IDFA) from a progressive web app

https://developers.google.com/web/progressive-web-apps/


回答1:


Google Advertising ID is not accessible to progressive web app running in browser and so the installed PWA.

Said that, you can make it available to your installed PWA using an Android service(which is a native code getting the Google Advertising ID) and passing it to your PWA using Deep links, by setting a Indent filter to your PWA with a URL and have the ID retrieved in your native code passed to web app in the query para (URL).

You can refer to this java code to retrieve device identifiers and wrap it as a Android service, which calls your PWA using deep links.



来源:https://stackoverflow.com/questions/38889869/how-to-fetch-device-information-from-a-progressive-web-app

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!