如何从渐进式Web应用程序中获取设备信息 [英] How to fetch device information from a progressive web app

查看:549
本文介绍了如何从渐进式Web应用程序中获取设备信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从渐进式网络应用中获取设备信息(Google Advertising ID或IDFA)

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

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

推荐答案

Google广告ID无法访问

说,您可以使用Android服务(获取Google广告ID的本机代码)将其提供给已安装的PWA并将其传递给您的使用深层链接的PWA ,通过使用URL为您的PWA设置缩进过滤器,并将您的本机代码中检索到的ID传递给查询段(URL)中的Web应用程序。

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).

您可以参考到这个 java code 检索设备标识符并将其包装为Android服务,该服务使用深层链接调用您的PWA。

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.

这篇关于如何从渐进式Web应用程序中获取设备信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆