0

I am using following source https://github.com/liveservices/LiveSDK-for-Android.

Do someone know how to get shared preferences after the LiveAuthClient process. I have to get REFRESH_TOKEN_KEY and COOKIE_DELIMITER from the sharedprefences file and clear it after saving it in a database. The aim is to save this to values in a database to login with multiple skydrive accounts.

Any ideas would be helpful. Thank you.

4

1 回答 1

0

如果有人想知道使用:

/** Name of the preference file */
public static final String FILE_NAME = "com.microsoft.live";
public static final String COOKIES_KEY = "cookies";
public static final String REFRESH_TOKEN_KEY = "refresh_token";

SharedPreferences preferences = getSharedPreferences(SDriveConstants.FILE_NAME, Context.MODE_PRIVATE);
String refresh_tkn_key = preferences.getString(SDriveConstants.REFRESH_TOKEN_KEY, "");
String cookies_key = preferences.getString(SDriveConstants.COOKIES_KEY, "");
于 2013-03-20T12:56:20.283 回答