public class AppConfig {
private static String TAG = SessionManager.class.getSimpleName();
// Shared Preferences
SharedPreferences pref;
SharedPreferences.Editor editor;
Context _context;
// Shared pref mode
int PRIVATE_MODE = 0;
// Shared preferences file name
private static final String PREF_NAME = "Login";
AppConfig appConfig = new AppConfig(_context.getApplicationContext());
public static String BASE_URL = appConfig.apiDecider();
public static String login = BASE_URL + "Login";
public AppConfig(Context context) {
this._context = context;
pref = _context.getSharedPreferences(PREF_NAME, PRIVATE_MODE);
editor = pref.edit();
}
public String apiDecider(){
String lc = pref.getString("locationSession", null);
//String lc = locationPref.getString("locationSession", null);
String url = "";
if (lc.equals("U") && lc != null) {
url = "";
} else if (lc.equals("S") && lc != null) {
url = "";
}
return url;
}
}