简体   繁体   English

当应用程序处于后台时将数据发送到服务器

[英]send data to server when app is background

I'm developing an iOS app which interacts with BLE device. 我正在开发一个与BLE设备交互的iOS应用。 what I wanted to do is, app detects BLE device and gets info from it in background mode. 我想做的是,应用程序检测到BLE设备并在后台模式下从中获取信息。 After getting info from BLE in background mode, I want to send that info to server. 在后台模式下从BLE获取信息后,我想将该信息发送到服务器。 how can i achieve this functionality. 我如何实现此功能。

Yes you can do this, 是的,你可以做到

Keep one connection request alive in background, whenever your BLE device advertised your app should automatically connect with BLE device and getting information from your BLE device as per your services implementation. 每当您的BLE设备宣告您的应用应自动与BLE设备连接并根据服务实现从BLE设备获取信息时,请在后台保留一个连接请求。 After getting data from BLE device you can send that data via web service using background task. 从BLE设备获取数据后,您可以使用后台任务通过Web服务发送该数据。

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

相关问题 在后台运行应用程序,并在应用程序处于前台或后台时在后台将数据发送到服务器 - Run app in background and send data to server in background when the application is in foreground or in background 如何在应用程序处于后台时创建UIBackgroundTask以发送数据? - how to create a UIBackgroundTask to send data when app is in background? 在后台运行应用程序时ping服务器 - ping server when the app is in background 获取位置数据并在后台发送到服务器 - Getting the location data and send to server in background 使用后台获取将数据发送到服务器? - Using background fetch to send data to server? 当app在后台时,我可以将用户的当前位置发送到服务器吗? - Can I send user's current location to server, when app is in background? 向应用程序发送静默推送通知,更新位置并在后台发送到服务器 - Send silent push notification to app, update location and send to server in background 当应用程序在后台时发送 http 请求 - Send http requests when app is in background 当互联网可用时,iOS开始从后台将数据发送到服务器 - iOS Start to send data to server from background when internet becomes available 当应用进入后台模式时,XMPP应用发送消息 - XMPP App send message with when app enter background mode
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM