[英]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.