简体   繁体   English

连接BLE时在后台运行的推送通知应用

[英]Push Notification App Running in Background When BLE is Connected

I worked on an Application which is Worked on BLE. 我开发了适用于BLE的应用程序。 i want push a notification ( App Running in Background When BLE is Connected) if any changes in Hardware. 如果硬件发生任何更改,我想推送通知(连接BLE时在后台运行应用程序)。 I Read Document 我阅读文件

Even if your app supports one or both of the Core Bluetooth background execution modes, it can't run forever. 即使您的应用程序支持一种或两种Core Bluetooth后台执行模式,也无法永远运行。 At some point, the system may need to terminate your app to free up memory for the current foreground app—causing any active or pending connections to be lost, for instance. 在某个时候,系统可能需要终止您的应用程序以释放当前前景应用程序的内存,例如,导致所有活动或挂起的连接丢失。

can i achieve my goal even my app in Background . 我能实现我的目标,甚至是我在Background中的应用程序。 If It is Possible Suggest me how to Achieve this . 如果有可能,建议我如何做到这一点。 Thanks In Advance. 提前致谢。

You may keep app in background by means of: 您可以通过以下方式使应用程序处于后台:

1.Audiosession(use this to play silent sound) 1.Audiosession(用来播放静音)

2.Location 2.Location

3.VoIP 3.VoIP

Any method can keep App in background and avoid App from being killed by system. 任何方法都可以使App处于后台,并避免被系统杀死。

BLE Runs in the background, you need to specify that your app uses BLE Accessories or your app acts as a LE Accessory in the Background modes in app capabilities. BLE在后台运行,您需要指定您的应用程序使用BLE附件,或者您的应用程序在应用程序功能的“后台”模式下充当LE附件。

I've tried firing local notifications, while the application is in the background. 我尝试在应用程序处于后台时触发本地通知。 BLE even works if the app is killed by the system, when the OS receives some communication from your peripheral or central, iOS wakes your app up and executes the desired function, before putting your app back to sleep. 如果应用程序被系统杀死,则BLE甚至可以工作,当操作系统从您的外围设备或中央设备接收到某些通信时,iOS会唤醒您的应用程序并执行所需的功能,然后再使您的应用程序进入睡眠状态。

暂无
暂无

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

相关问题 iOS版; 当应用未运行或在后台运行时,推送通知不起作用 - iOS; Push notification is not work when the app is not running or in background 当应用程序在后台时推送通知 - Push notification when app in background 如果用户点击通知时应用已经在后台运行,如何获取推送通知的有效载荷? - How can you get the payload of a push notification if app is already running in the background when the user taps the notification? 当应用在后台运行时无法处理推送通知,收到推送但未点击横幅或警报 - Can't handle Push Notification when the app is running in Background, receives push but didn't click on the banner or alert 当应用程序处于后台或运行状态时,处理推送通知,而不是在应用程序终止时 - Handle push notification when app is in Background or Running state not when app is terminated 当应用在后台时,推送通知未显示 - Push Notification is not showing when app is in background 应用程序在后台 swift 3 时的远程推送通知 - remote push Notification when app is in background swift 3 当应用程序在后台时,推送通知不显示 - Push notification not displaying when app is in background iOS应用程序在后台时的GCM推送通知 - GCM push notification when iOS app is in the background 当应用程序在后台运行时,推送通知未调用didReceiveRemoteNotification - Push Notification not calling didReceiveRemoteNotification when app in background
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM