This is a migrated thread and some comments may be shown as answers.

iBeacon and local notifications in the background

5 Answers 133 Views
iOS Devices
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Martijn
Top achievements
Rank 1
Martijn asked on 21 May 2014, 12:16 PM
Hi,

I'm having some troubles receiving local notications in the background on iOS. Im trying to send a local notification whenever I'm in range of an iBeacon. The plugin i'm using is 'Cordova-plugin-ibeacon' (https://github.com/petermetz/cordova-plugin-ibeacon). To send local notifications I'm using 'Cordova Local-Notification Plugin' (https://github.com/katzer/cordova-plugin-local-notifications).

This works fine when the application is in the foreground, however when the application is in the background the notification's won't get send. Whenever I try to use the same code in an Xcode Cordova project these functions work fine in the background. Any idea on how to solve this, I'd like to use AppBuilder for this project? Does Appbuilder even allow background activity?

Im not running the application through the AppBuilder companion application and I also tried to disable the Livesync, hoping this would solve the problem but that didn't help. 

Thanks.

5 Answers, 1 is accepted

Sort by
0
Martijn
Top achievements
Rank 1
answered on 21 May 2014, 12:35 PM
Solved, I forgot to turn on the Background Mode in the project properties...
0
Yusuf
Top achievements
Rank 1
answered on 18 Aug 2014, 01:35 AM
Hey Martijn i need some help about that plugin can you talk with me in skype ?

My question is:

Can i use any brand ibeacon with that plugin ? So i just start ibeacon product and scan with this plugin ?

Thanks for help
0
Matt
Top achievements
Rank 1
answered on 10 Sep 2014, 10:41 AM
Hi Martijn,

Thanks for your post. We have the petermetz ibeacon cordova plugin working when when the app is in the foreground, but not when goes in the background (even though we have enabled all background bluetooth options within Telerik AppBuilder project properties). Did you install any extra plugins to get this to work?

Any help would be much appreciated.
0
Sergei
Top achievements
Rank 1
answered on 12 Sep 2014, 05:21 PM
I second my interest in a how-to or working example. You contribution to the community is much appreciated.
0
Kaloyan
Telerik team
answered on 15 Sep 2014, 10:12 AM
Hi,

@Yusuf: As long as I am aware, the plugin should work with any iBeacon brand. Further, you will need to monitor for available beacons and do something when one is in range. For example (as in Martijn's case), send local notification.

@Matt: Could you share which of the Background Mode options you have enabled? I guess you will need the Location and the Bluetooth services running in the background.

@Matt and @Sergei: Unfortunately, at this stage we do not have an example with the petermetz's iBeacon plugin. However, we will be happy to provide such in the near future, so thank you for the valuable feedback and your interest.

As for Martijn's implementation and use of the iBeacon plugin, we will be grateful if he can share some general guidance with us, as well.

Regards,
Kaloyan
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
iOS Devices
Asked by
Martijn
Top achievements
Rank 1
Answers by
Martijn
Top achievements
Rank 1
Yusuf
Top achievements
Rank 1
Matt
Top achievements
Rank 1
Sergei
Top achievements
Rank 1
Kaloyan
Telerik team
Share this question
or