diff --git a/lib/src/main/java/org/altbeacon/beacon/service/ScanJob.java b/lib/src/main/java/org/altbeacon/beacon/service/ScanJob.java index b73809658..18b66651e 100644 --- a/lib/src/main/java/org/altbeacon/beacon/service/ScanJob.java +++ b/lib/src/main/java/org/altbeacon/beacon/service/ScanJob.java @@ -58,6 +58,7 @@ public boolean onStartJob(final JobParameters jobParameters) { LogManager.e(TAG, "Cannot allocate a scanner to look for beacons. System resources are low."); return false; } + ScanJobScheduler.getInstance().ensureNotificationProcessorSetup(getApplicationContext()); if (jobParameters.getJobId() == getImmediateScanJobId(this)) { LogManager.i(TAG, "Running immediate scan job: instance is "+this); } diff --git a/lib/src/main/java/org/altbeacon/beacon/service/ScanJobScheduler.java b/lib/src/main/java/org/altbeacon/beacon/service/ScanJobScheduler.java index 422f3d0ca..9f56baa3b 100644 --- a/lib/src/main/java/org/altbeacon/beacon/service/ScanJobScheduler.java +++ b/lib/src/main/java/org/altbeacon/beacon/service/ScanJobScheduler.java @@ -63,7 +63,7 @@ public static ScanJobScheduler getInstance() { private ScanJobScheduler() { } - private void ensureNotificationProcessorSetup(Context context) { + void ensureNotificationProcessorSetup(Context context) { if (mBeaconNotificationProcessor == null) { mBeaconNotificationProcessor = new BeaconLocalBroadcastProcessor(context); }