iBeacon and local notifications in the background

6 posts, 0 answers
  1. Martijn
    Martijn avatar
    2 posts
    Member since:
    Oct 2012

    Posted 21 May 2014 Link to this post

    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.
  2. Martijn
    Martijn avatar
    2 posts
    Member since:
    Oct 2012

    Posted 21 May 2014 in reply to Martijn Link to this post

    Solved, I forgot to turn on the Background Mode in the project properties...
  3. Yusuf
    Yusuf avatar
    1 posts
    Member since:
    Aug 2014

    Posted 17 Aug 2014 in reply to Martijn Link to this post

    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
  4. Matt
    Matt avatar
    1 posts
    Member since:
    Aug 2013

    Posted 10 Sep 2014 in reply to Martijn Link to this post

    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.
  5. Sergei
    Sergei avatar
    44 posts
    Member since:
    Aug 2012

    Posted 12 Sep 2014 Link to this post

    I second my interest in a how-to or working example. You contribution to the community is much appreciated.
  6. Kaloyan
    Admin
    Kaloyan avatar
    872 posts

    Posted 15 Sep 2014 Link to this post

    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.

     
Back to Top