Created
October 13, 2018 01:45
-
-
Save markchristopherng/11a01cbf06bab4490b0c4ec8961be2e8 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 void onReceive(Context context, Intent intent) { | |
FenceState fenceState = FenceState.extract(intent); | |
String geoFenceKey = fenceState.getFenceKey(); | |
switch (fenceState.getCurrentState()) { | |
case FenceState.TRUE: | |
Timber.d("fence %s detected", geoFenceKey); | |
break; | |
case FenceState.FALSE: | |
Timber.d("fence %s false", geoFenceKey); | |
break; | |
case FenceState.UNKNOWN: | |
Timber.d("fence %s unknown", geoFenceKey); | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment