|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Objectcom.baidu.sapi2.YiAccountUtils
public class YiAccountUtils
This class is a wrapper of AccountManager and is meant to be used to query the account data.
嵌套类摘要 | |
---|---|
static interface |
YiAccountUtils.BaiduAccountCallback
|
字段摘要 | |
---|---|
static String |
BAIDUACCOUNT_ACTION
|
static String |
BAIDUACCOUNT_KEY
|
static String |
BAIDUACCOUNT_TYPE
|
构造方法摘要 | |
---|---|
YiAccountUtils(android.content.Context context)
|
方法摘要 | |
---|---|
String |
blockingGetBaiduAuthToken(boolean notifyAuthFailure)
|
static YiAccountUtils |
getInstance(android.content.Context context)
|
int |
getNumOfAccounts(String accountType)
Return the number of the existing accounts for an account type |
void |
getTokenAsync(String accountType,
ITokenCallback tcallback,
android.app.Activity activity)
Get the token in async mode. |
String |
getUserData(String key)
|
boolean |
hasYiAccount()
Query if the baidu account exists |
void |
invalidateToken(String accountType,
String token)
Invalidate the token in cache. |
boolean |
isLogin()
|
void |
manageAccount()
Launch the account management UI |
void |
removeAccount()
|
void |
setAccount(String accountType)
Launch the account setting UI if there is only one account added for a certain account type. |
void |
startFillNameActivity(android.app.Activity activity,
int requestCode,
boolean showDialog)
|
从类 java.lang.Object 继承的方法 |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
字段详细信息 |
---|
public static final String BAIDUACCOUNT_TYPE
public static final String BAIDUACCOUNT_ACTION
public static final String BAIDUACCOUNT_KEY
构造方法详细信息 |
---|
public YiAccountUtils(android.content.Context context)
方法详细信息 |
---|
public static YiAccountUtils getInstance(android.content.Context context)
public boolean hasYiAccount()
public void invalidateToken(String accountType, String token)
accountType
- token
- public void getTokenAsync(String accountType, ITokenCallback tcallback, android.app.Activity activity)
accountType
- the account typetcallback
- : the callback to receive the token. It is invoked in a
separated thread.public void setAccount(String accountType)
accountType
- by default it is "com.baidu"public int getNumOfAccounts(String accountType)
accountType
- "com.baidu" by default
public String getUserData(String key)
public void startFillNameActivity(android.app.Activity activity, int requestCode, boolean showDialog) throws android.content.ActivityNotFoundException
android.content.ActivityNotFoundException
public String blockingGetBaiduAuthToken(boolean notifyAuthFailure)
public boolean isLogin()
public void manageAccount()
public void removeAccount()
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |