Created
May 7, 2018 21:30
-
-
Save parahall/c2a6bb4701a1e8767578c54463702a90 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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