Statistics
| Branch: | Revision:

root / src / com / rackspacecloud / android / Preferences.java @ d9fea798

History | View | Annotate | Download (1.6 kB)

1
package com.rackspacecloud.android;
2

    
3
import android.os.Bundle;
4
import android.preference.PreferenceActivity;
5

    
6
public class Preferences extends PreferenceActivity{
7
    // The name of the SharedPreferences file we'll store preferences in.
8
    public static final String SHARED_PREFERENCES_NAME = "Preferences";
9
        
10
        // The key to the preference for the type of results to show (us/uk).
11
    // Identical to the value specified in res/values/strings.xml.
12
    public static final String PREF_KEY_RESULTS_TYPE = "countries_type";
13

    
14
    // The key to the Auth Server preference.
15
    public static final String PREF_KEY_AUTH_SERVER = "authServerPref";
16
    
17
    // The key to the application passcode hash.
18
    public static final String PREF_KEY_PASSCODE_HASH = "passcode";
19
    
20
    //the key to the Password on/off preference.
21
    public static final String PREF_KEY_PASSWORD_LOCK = "hasPassword";
22

    
23
    // The values of the preferences for the type of results to show (us/uk).
24
    // Identical to the values specified in res/values/strings.xml.
25
    public static final int COUNTRY_US = 0;
26
    public static final int COUNTRY_UK = 1;
27
    
28
    //Define auth server here
29
    public static final String COUNTRY_US_AUTH_SERVER = "https://auth.api.rackspacecloud.com/v1.0";
30
    public static final String COUNTRY_UK_AUTH_SERVER = "https://lon.auth.api.rackspacecloud.com/v1.0";
31
    
32
        protected void onCreate(Bundle savedInstanceState) {
33
                super.onCreate(savedInstanceState);
34
        getPreferenceManager().setSharedPreferencesName(SHARED_PREFERENCES_NAME);
35
                addPreferencesFromResource(R.layout.preferences);
36
        }
37
}