RE: Running timers in background of BLE app
RE: Running timers in background of BLE app
- Subject: RE: Running timers in background of BLE app
- From: Nick Moen <email@hidden>
- Date: Thu, 09 Aug 2012 13:02:11 -0500
- Thread-topic: Running timers in background of BLE app
Title: Running timers in background of BLE app
Thanks for all the input. I know that I
cannot use push notifications as suggested by Ramin because the app has to stay
in the background even after the fifteen minute time block is up. During the 15
minute interval the app will be scanning for many available BLE devices. Once
the fifteen minutes is up, the app will restart the scan and begin the process
over again, all while in the background. There is the possibility of going more
than ten minutes without discovering a new peripheral. Again thanks for all the
input. I will keep digging.
Regards,
Nick
From: Justin Shorney
[mailto:email@hidden]
Sent: Thursday, August 09, 2012
11:24 AM
To: Michael Kroll
Cc: Nick Moen; email@hidden
Subject: Re: Running timers in
background of BLE app
We did some testing along these lines and a timer that runs for 15 min
won't work in the background. You have to hook into the didDiscoverPeripheral
at some point. Once this call is issued in the background you have aprox.
10seconds to do what you need to do before the watchdog gets you (or to register
for a long running background task). That is unless another didDiscoverPeripheral
gets called in which case you have another 10 seconds or so. If your iOS device
is going to be in constant proximity of your Bluetooth object you could store
the initial discovery time and check if 15min have passed on the subsequent
discoveries.
Sent from my iPhone
On Aug 9, 2012, at 8:48 AM, Michael Kroll <email@hidden>
wrote:
What about local notifications?
Regards,
Hi All,
I have an app that is currently scanning for BLE devices in the background.
This part is working well, but I now need to trigger an event every 15 minutes
or so. If the app subscribes to bluetooth-central, can Timers be run in the
background? If not does anyone have any recommendations? Thanks in advance for
any information.
Nick
_______________________________________________
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
_______________________________________________
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
|
_______________________________________________
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