Last active
March 16, 2016 22:28
-
-
Save patrykpoborca/70b81cede9c178f4fc79 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
RetrofitClient client = new Retrofit.Builder() | |
/*configure Retrofit */ | |
.build().create(RetrofitClient.class); | |
private void retrieveSomeValue(String param) { | |
client.doRequest(param) | |
.subscribe(response ->{ | |
getContext().getSharedPreferences("sharedpreferences", Context.MODE_PRIVATE) | |
.edit() | |
/*write response to disk */ | |
.commit(); | |
GlobalStateManager.getInstance(getContext(), response); // which then updates some global flags and | |
//uses context to launch an activity | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment