【问题标题】:app auto start not working after device rebooted(android 9)设备重启后应用程序自动启动不起作用(android 9)
【发布时间】:2019-06-13 09:25:24
【问题描述】:

我正在使用此 Cordova 插件,以便在设备重新启动后自动启动 Cordova 应用程序。 https://github.com/ToniKorin/cordova-plugin-autostart

我检查了很多版本,发现 android 7.1.2 版本可以正常工作,但另一个版本如 android 9 不能正常工作。

是否有任何其他插件可用于此功能。

【问题讨论】:

    标签: android jquery cordova cordova-plugins


    【解决方案1】:

    我以前也有同样的问题。

    当我第一次使用这个插件时https://github.com/ToniKorin/cordova-plugin-autostart

    它只在调试模式(Android 9 模拟器)下对我有用,但在真正的 android 9 设备手机中它不起作用。

    要在真实设备 (android 9) 上运行,您需要使用这个 ionic 官方插件: https://github.com/NeoLSN/cordova-plugin-android-permissions

    您必须授予应用“RECEIVE_BOOT_COMPLETED”权限才能自动启动。

    来源:https://developer.android.com/reference/android/Manifest.permission.html#RECEIVE_BOOT_COMPLETED

    它帮助我解决了问题,希望对你有所帮助。

    【讨论】:

      猜你喜欢
      • 2021-04-25
      • 1970-01-01
      • 2015-10-28
      • 1970-01-01
      • 2020-05-11
      • 2020-02-10
      • 2021-12-26
      • 1970-01-01
      • 2012-08-06
      相关资源
      最近更新 更多