Skip to content

Commit

Permalink
Fix failed callbacks by registering local broadcast receiver at job s…
Browse files Browse the repository at this point in the history
…tartup.
  • Loading branch information
davidgyoung committed Mar 9, 2019
1 parent 9e2d42d commit b84498b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit b84498b

Please sign in to comment.