I am getting the following error message:
"Cannot make a static reference to the non-static method getPreferences(int) from the type Activity" is the error in my case. 'TimeCardLogin' must be a static variable."
How do I get a preference into a static String variable?
public class MyBaseURLContainer extends Activity {
    public static String urlPref = "";
    static String BASE_URL = 
           getPreferences(MODE_PRIVATE).getString("Name of variable",urlPref);
    public static final  String TimeCardLogin = BASE_URL + "/timecard";
}
 
     
    