Progressive web app : Start at android device boot

巧了我就是萌 提交于 2020-03-22 07:18:58

问题


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.

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.

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 ?


回答1:


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.

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.



来源:https://stackoverflow.com/questions/49694633/progressive-web-app-start-at-android-device-boot

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