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
| public class Example { | |
| private String auth_token; | |
| private void chainApiCalls() throws Exception { | |
| api.getToken() | |
| .doOnNext(token -> auth_token = token) | |
| .flatMap(api::getPersonNumber) | |
| .flatMap(person_number -> api.getUserInfo(auth_token, person_number)) | |
| .doOnCompleted(() -> auth_token = null) |
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
| import android.os.Bundle; | |
| import com.nuvyyo.android.slipstream.exovideoplayer.BuildConfig; | |
| public class BundleUtils { | |
| public static void logBundleKeys(Bundle args) { | |
| try { | |
| if (BuildConfig.DEBUG) | |
| for (String key : args.keySet()) { | |
| final Object value = args.get(key); |
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
| import android.content.Context; | |
| import com.google.android.gms.common.ConnectionResult; | |
| import com.google.android.gms.common.GooglePlayServicesUtil; | |
| public class GMSUtil { | |
| public static PlayServicesState getPlayServicesState(Context context) { | |
| String message = ""; |
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
| public static class DateTimeIntervalPhraser { | |
| public static class Values { | |
| public static final Long SECOND = 1000l; | |
| public static final Long MINUTE = 60 * SECOND; | |
| public static final Long HOUR = 60 * MINUTE; | |
| public static final Long DAY = 24 * HOUR; | |
| public static final Long WEEK = 7 * DAY; | |
| public static final Long YEAR = 365 * DAY; |