c# - Xamarin.Forms:Plugin.Geofence 不显示通知
问题描述
我正在为 Xamarin Forms 使用 https://github.com/CrossGeeks/GeofencePlugin nuget 来尝试一些地理围栏。一切似乎都正常,但进入/停留/退出时没有显示任何通知。尝试了通知插件,它们发送没有问题。位置似乎很好,它在地理围栏内,但仍然没有。
CrossGeofence.Current.StartMonitoring(new GeofenceCircularRegion("My Region", 52.922603, -1.498039, 300)
{
//To get notified if user stays in region for at least 5 minutes
NotifyOnStay = true,
NotifyOnEntry = true,
NotifyOnExit = true,
ShowNotification = true,
ShowEntryNotification = true,
ShowExitNotification = true,
ShowStayNotification = true,
Persistent = true,
NotificationStayMessage = "stay message!",
NotificationEntryMessage = "entry message!",
NotificationExitMessage = "exit message!",
StayedInThresholdDuration = TimeSpan.FromSeconds(10),
});
解决方案
推荐阅读
- javascript - 如何使用 JS 切换图像?
- prolog - 是否应该编写文本处理 DCG 来处理代码或字符?或两者?
- python-3.x - 编写嵌套代码时出现未绑定的本地错误
- c++ - 在 C++ 中读取数字时不允许换行?
- node.js - HelpScout 和 SSO - 启动单点登录?
- git - Microsoft Visual SourceSafe 和 GIT 可以一起工作吗?
- html - 如何调整布尔玛表格列的宽度
- python - 使用 PySpark 计算出现次数
- firebase - 如何检查firestore安全规则列表请求中是否存在文档?
- python - 加载 .kv 文件有困难