渐进式Web应用程序:从android设备启动开始 [英] Progressive web app : Start at android device boot

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

问题描述

在工作中,我们正在从本机应用程序切换到渐进式Web应用程序. 我们之前获得的而不是PWA拥有的最后一个功能是,在设备启动时我们的应用程序自动打开之前.

At work, we are switching from native app to progressive web app. The last feature that we got before and not with the PWA is that before our application opened automatically at startup of device.

PWA似乎不可能(我错了吗?). 我们正在寻求安装可以在启动时启动PWA的android本机应用程序.但是似乎我们需要PWA软件包名称或其他名称才能启动应用程序.

It seems that it not possible (am i wrong ?) with PWA. We are looking to installing an android native application that could launch PWA at startup. But it seems that we need PWA package name or other to launch application.

您知道PWA是否具有软件包名称或其他名称吗? 或者,也许如果我们说的更笼统,您是否认为有可能吗?

Did you know if PWA have a package name or other ? Or maybe if we speak more generally, did you think if it's possible ?

推荐答案

由于PWA本身无法监听 BroadcastReceiver ,一旦收到

You need native code here to help start your PWA as your PWA itself cant listen for ACTION_BOOT_COMPLETED, which is needed for you to trigger your app on boot-up. You can create BroadcastReceiverand once you receive ACTION_BOOT_COMPLETED, use Android Intent Filters of your PWA to deep link from your Native code.

如果您打算将PWA分发到非企业环境中,在该环境中无法控制和保证安装本机代码,那么我看不到其他任何在启动时调用PWA的方法.

If you are thinking of distributing your PWA to non enterprise environment, where installing your Native code is not controlled and guaranteed, I do not see any other way to call your PWA on boot.

这篇关于渐进式Web应用程序:从android设备启动开始的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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