Github user therajanmaurya commented on a diff in the pull request:
https://github.com/apache/incubator-taverna-mobile/pull/28#discussion_r81198174
--- Diff:
app/src/main/java/org/apache/taverna/mobile/data/local/PreferencesHelper.java
---
@@ -169,4 +178,25 @@ private void setUserAvatar(String userAvatar) {
}
+ public boolean isUserPlayerLoggedInFlag() {
+ return mPref.getBoolean(PREF_KEY_PLAYER_LOGGED_IN, false);
+ }
+
+ public void setUserPlayerLoggedInFlagAndCredential(Boolean flag,
String credential) {
+ mPref.edit().putBoolean(PREF_KEY_PLAYER_LOGGED_IN, flag).apply();
+ mPref.edit().putString(PREF_KEY_PLAYER_CREDENTIAL,
credential).apply();
+ }
+
+ public void setUserPlayerLoggedInFlag(Boolean flag) {
+ mPref.edit().putBoolean(PREF_KEY_PLAYER_LOGGED_IN, flag).apply();
+
+ }
+
+ public String getUserPlayerCredential() {
+ return mPref.getString(PREF_KEY_PLAYER_CREDENTIAL, " ");
+ }
+
+ public String getPlayerURL() {
+ return sharedPref.getString(PREF_KEY_PLAYER_URL,
"http://139.59.28.12:3000/");
--- End diff --
make string variable global and use it here, So that next time when you
will change this address then you do not need to go through whole file.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---