[英]Progressive web app : Start at android device boot
At work, we are switching from native app to progressive web app. 在工作中,我们正在从本机应用程序切换到渐进式Web应用程序。 The last feature that we got before and not with the PWA is that before our application opened automatically at startup of device. 我们之前(而不是PWA)获得的最后一个功能是在设备启动时自动打开应用程序之前。
It seems that it not possible (am i wrong ?) with PWA. 似乎PWA是不可能的(我错了吗?)。 We are looking to installing an android native application that could launch PWA at startup. 我们正在寻求安装可以在启动时启动PWA的android本机应用程序。 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 ? 您知道PWA是否具有软件包名称或其他名称吗? Or maybe if we speak more generally, did you think if it's possible ? 或者,也许如果我们说的更笼统,您是否认为有可能?
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. 您需要此处的本地代码来帮助启动PWA,因为PWA本身无法监听ACTION_BOOT_COMPLETED ,这是启动时触发应用程序所必需的。 You can create BroadcastReceiver and once you receive ACTION_BOOT_COMPLETED , use Android Intent Filters of your PWA to deep link from your Native code. 您可以创建BroadcastReceiver ,一旦收到ACTION_BOOT_COMPLETED ,请使用PWA的Android Intent过滤器从本机代码进行深层链接。
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. 如果您打算将PWA分发到非企业环境中,在该环境中无法控制和保证安装本机代码,那么我看不到任何其他在启动时调用PWA的方法。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.