Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@Override
public WorkerResult doWork() {
...
LocalBroadcastManager.getInstance(getAppContext()).registerReceiver(receiver, new IntentFilter(LocationBaseBroadcast.ACTION_NEW_LOCATION_ARRIVED));
locationTracker.start();
try {
locationWait = new CountDownLatch(1);
locationWait.await();
} catch (InterruptedException e) {
e.printStackTrace();
}
cleanUp();
return WorkerResult.SUCCESS;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment