[BeaconsPlugin] Outsystems Beacons plugin fails

[BeaconsPlugin] Outsystems Beacons plugin fails

  
Forge Component
(2)
Published on 2017-10-25 by Experts
2 votes
Published on 2017-10-25 by Experts

Our experience with the one Outsystems Beacon plugin is that it fails to work when running in the

background. Both on the Android -and iOS platform. Does anyone have a solution for this impedement?


Furthermore when opening the received notifications of the region enter - and exit events it lets the app

crash. Any help is welcome.


Hi 

Does it give any error message?

Hi there .. 

For a client of mine I have almost the same problem.

We added an even logger for every RegionEntry and RegionExit.

This type of monitoring works fine when the app is running in the foreground / is active.

All events are logged inside the local database of the app.

When the app is suspended (background) the OS of the mobile phone does trigger the notification messages (and when you swipe the notification message it will open the app) ... and one opened the app will start monitoring again ... 

BUT :-) ... if I do not swipe the notification message(s) the events are not logged by the app.

Of course the app is not active so this might be as intended (and the event listeners are added as part of the DOM which is not there when the app is inactive) ... but the documentation suggests otherwise.

It suggest that even when the app is in the background / not active the events will be triggered inside the app.

So either it is not the correct interpretation from my side or ...

(By the way tested it only on Android with generated native app)

It might not be totally clear but, as Christian Nyqvist stated, when the application is closed there's no DOM available meaning that the events can't be delivered to the OutSystems Mobile Application, for this reason it is a requirement that the user manually and explicitly clicks on the notification in order to launch the application and consequently deliver that information to the webapp.

From the plugin documentation (https://github.com/outsystemsexperts/phonegap-estimotebeacons) we see "Region monitoring while application is closed" which is entirely true although that information doesn't get automatically delivered for the reason aforementioned.

Additionally, if the application is in background or closed, by enabling the bluetooth the region monitoring starts itself but, if the bluetooth is switched off, the monitoring is stopped.


Regarding the crash, do you have any more details? Perhaps logcat output? 


Regards,

João Gonçalves

Have you try this BackgroundMode plugin:
https://www.outsystems.com/forge/component/1727/backgroundmode-plugin/

Also, on Android M, there is battery optimization that kill any background app after a certain time.

You need to setup your App as "Not Optimized".

Just want to let you know that a new version of the plugin has been released containing various bug fixes and some related with background behaviour.