• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
回复: Re: scan BLE device in background
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

回复: Re: scan BLE device in background


  • Subject: 回复: Re: scan BLE device in background
  • From: "email@hidden" <email@hidden>
  • Date: Tue, 31 Jul 2012 10:35:24 +0800

Hi Joakim,
Does the scanForPeripheralsWithServices function just to be called one times, and it will continue be called when the app is  moved to the background?
Another question is shall I need to pass an array of (at least one) service IDs to scanForPeripheralsWithServices? Or passing nil?
       
Thanks.
 

ZZ_Zhang
 
发件人: Joakim Linde
发送时间: 2012-07-31 10:15
收件人: zz_zhang99
抄送: bluetooth-dev
主题: Re: 回复: Re: scan BLE device in background

Just call scanForPeripheralsWithServices while the app is in the foreground and scanning will continue when the app is moved to the background. 

Thanks,
Joakim

On Jul 30, 2012, at 7:12 PM, email@hidden wrote:

Hi Joakim
Thank you for your reply.
Additional question is how to scan the BLE device  in background.
Thanks advance.
 

zz_zhang
 
发件人: Joakim Linde
发送时间: 2012-07-31 07:16
收件人: zz_zhang99
抄送: bluetooth-dev
主题: Re: scan BLE device in background

Hi zz_zhang,

The "bluetooth-central" keyword gives the application the right to handle Bluetooth specific events while in the background. It does not give the app a generic permission to run in the background. Meaning, NSTimers will not work when the app is in the background. 

Thanks,
Joakim

On Jul 30, 2012, at 12:18 AM, email@hidden wrote:

Hi,
How to scan BLE device in background?
I  schedule a NSTimer to call scan function. But the timer event is not called when app in the background.
I have added the "bluetooth-central"  to UIBackgroundModes in the app's info.plist. And my app run well in background when receives a notificaion form peripheral.
 
Thanks advance.
 

zz_zhang
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
 email@hidden



 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Bluetooth-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >scan BLE device in background (From: "email@hidden" <email@hidden>)
 >Re: scan BLE device in background (From: Joakim Linde <email@hidden>)
 >回复: Re: scan BLE device in background (From: "email@hidden" <email@hidden>)
 >Re: 回复: Re: scan BLE device in background (From: Joakim Linde <email@hidden>)

  • Prev by Date: Re: 回复: Re: scan BLE device in background
  • Next by Date: Read/Write Blob
  • Previous by thread: Re: 回复: Re: scan BLE device in background
  • Next by thread: getting multiple didDiscoverService in background
  • Index(es):
    • Date
    • Thread