简体   繁体   中英

Push Notification App Running in Background When BLE is Connected

I worked on an Application which is Worked on BLE. i want push a notification ( App Running in Background When BLE is Connected) if any changes in Hardware. I Read Document

Even if your app supports one or both of the Core Bluetooth background execution modes, it can't run forever. 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 . 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)

2.Location

3.VoIP

Any method can keep App in background and avoid App from being killed by system.

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM