How to fetch device information from a progressive web app

后端 未结 1 1303
轻奢々
轻奢々 2020-12-17 02:06

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

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

相关标签:
1条回答
  • 2020-12-17 02:37

    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.

    0 讨论(0)
提交回复
热议问题