简体   繁体   English

如何将 SYSTEM_ALERT_WINDOW 与 ionic v6 Cordova 一起使用

[英]How use SYSTEM_ALERT_WINDOW with ionic v6 Cordova

I have implemented the permission for use SYSTEM_ALERT_WINDOW (pop-up window) with permission accepted but I don't know how use or how show the pop-up window for Android.我已经实现了使用 SYSTEM_ALERT_WINDOW(弹出窗口)的权限,但我不知道如何使用或如何显示 Android 的弹出窗口 window。

I want show pop-up or open the application when is in mode background .我想在后台模式下显示弹出窗口或打开应用程序。

在此处输入图像描述

I try with notification push with the property force-start: 1 but not results success, also I try with background mode but I don't know how show popup我尝试使用属性force-start: 1进行通知推送,但结果不成功,我也尝试使用后台模式,但我不知道如何显示弹出窗口

Any help Thanks任何帮助谢谢

You have to add the cordova background mode (if you are using Cordova) for that purpose.为此,您必须添加 cordova 后台模式(如果您使用 Cordova)。

https://github.com/katzer/cordova-plugin-background-mode https://github.com/katzer/cordova-plugin-background-mode

When a notification arrives, you just move to foreground your application (all the documentation is on github).当通知到达时,您只需将应用程序移至前台(所有文档都在 github 上)。

It should work with the permission you've already granted.它应该与您已经授予的权限一起使用。

Take into account that you better move your app to the back when the task you are performing finishes考虑到当您正在执行的任务完成时,您最好将您的应用程序移到后面

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 SYSTEM_ALERT_WINDOW中的ListView - ListView in SYSTEM_ALERT_WINDOW 如何检查权限在Android Lollipop上授予SYSTEM_ALERT_WINDOW? - How to check permission SYSTEM_ALERT_WINDOW is granted on Android Lollipop? 如何在本机反应中删除 SYSTEM_ALERT_WINDOW android 权限 - How remove SYSTEM_ALERT_WINDOW android permission in react native 如何访问SYSTEM_ALERT_WINDOW权限运行时间? - How to access SYSTEM_ALERT_WINDOW permission run time? SYSTEM_ALERT_WINDOW 的运行时权限 - Runtime permission for SYSTEM_ALERT_WINDOW Android SYSTEM_ALERT_WINDOW权限 - Android SYSTEM_ALERT_WINDOW permission 如何在我的 android 应用程序中根据请求自动授予 SYSTEM_ALERT_WINDOW 权限? - How do I grant SYSTEM_ALERT_WINDOW permission automatically on request, in my android App? 如何从 system_alert_window package 调用应用程序范围的回调 - How can I call an app scoped callback from the system_alert_window package 如何防止我的应用程序内容来自具有“SYSTEM_ALERT_WINDOW”权限的应用程序 - How prevent my app content from apps that has “SYSTEM_ALERT_WINDOW” permission 如何处理SYSTEM_ALERT_WINDOW权限未在某些Marshmallow设备上自动授予 - How to handle SYSTEM_ALERT_WINDOW permission not being auto-granted on some pre-Marshmallow devices
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM