Most visited

Recently visited

Added in API level 5

AccountAuthenticatorActivity

public class AccountAuthenticatorActivity
extends Activity

java.lang.Object
   ↳ android.content.Context
     ↳ android.content.ContextWrapper
       ↳ android.view.ContextThemeWrapper
         ↳ android.app.Activity
           ↳ android.accounts.AccountAuthenticatorActivity


用于实现用于帮助实现AbstractAccountAuthenticator的Activity的基类。 如果AbstractAccountAuthenticator需要使用一个活动来处理请求,那么它可以让活动扩展AccountAuthenticatorActivity。 AbstractAccountAuthenticator使用以下内容传递对意图的响应:

      intent.putExtra(KEY_ACCOUNT_AUTHENTICATOR_RESPONSE, response);
 
The activity then sets the result that is to be handed to the response via setAccountAuthenticatorResult(android.os.Bundle). This result will be sent as the result of the request when the activity finishes. If this is never set or if it is set to null then error ERROR_CODE_CANCELED will be called on the response.

Summary

Inherited constants

From class android.app.Activity
From class android.content.Context
From interface android.content.ComponentCallbacks2

Inherited fields

From class android.app.Activity

Public constructors

AccountAuthenticatorActivity()

Public methods

void finish()

如果结果不存在,则发送结果或Constants.ERROR_CODE_CANCELED错误。

final void setAccountAuthenticatorResult(Bundle result)

设置作为导致此Activity启动的请求的结果发送的结果。

Protected methods

void onCreate(Bundle icicle)

如果冰柱不为零,则从冰柱的意图中撤回AccountAuthenticatorResponse。

Inherited methods

From class android.app.Activity
From class android.view.ContextThemeWrapper
From class android.content.ContextWrapper
From class android.content.Context
From class java.lang.Object
From interface android.view.LayoutInflater.Factory2
From interface android.view.Window.Callback
From interface android.view.KeyEvent.Callback
From interface android.view.View.OnCreateContextMenuListener
From interface android.content.ComponentCallbacks2
From interface android.view.LayoutInflater.Factory
From interface android.content.ComponentCallbacks

Public constructors

AccountAuthenticatorActivity

Added in API level 5
AccountAuthenticatorActivity ()

Public methods

finish

Added in API level 5
void finish ()

如果结果不存在,则发送结果或Constants.ERROR_CODE_CANCELED错误。

setAccountAuthenticatorResult

Added in API level 5
void setAccountAuthenticatorResult (Bundle result)

设置作为导致此Activity启动的请求的结果发送的结果。 如果结果为null或者此方法从未被调用,则请求将被取消。

Parameters
result Bundle: this is returned as the result of the AbstractAccountAuthenticator request

Protected methods

onCreate

Added in API level 5
void onCreate (Bundle icicle)

如果冰柱不为零,则从冰柱的意图中撤回AccountAuthenticatorResponse。

Parameters
icicle Bundle: the save instance data of this Activity, may be null

Hooray!