public class AuthActivity
extends android.app.Activity
Modifier and Type | Class and Description |
---|---|
static interface |
AuthActivity.SecurityProvider
Provider of the local security needs of an AuthActivity.
|
Modifier and Type | Field and Description |
---|---|
static String |
ACTION_AUTHENTICATE_V1
The Android action which the official Dropbox app will accept to
authenticate a user.
|
static String |
ACTION_AUTHENTICATE_V2
The Android action which the official Dropbox app will accept to
authenticate a user.
|
static String |
AUTH_PATH_CONNECT
The path for a successful callback with token (not the initial auth request).
|
static int |
AUTH_VERSION
The version of the API for the web-auth callback with token (not the initial auth request).
|
static String |
EXTRA_ACCESS_SECRET
The extra that goes in an intent when returning from Dropbox auth to
provide the user's access token secret, if auth succeeded.
|
static String |
EXTRA_ACCESS_TOKEN
The extra that goes in an intent when returning from Dropbox auth to
provide the user's access token, if auth succeeded.
|
static String |
EXTRA_ALREADY_AUTHED_UIDS
Used for internal authentication.
|
static String |
EXTRA_AUTH_STATE
Used for internal authentication.
|
static String |
EXTRA_CALLING_CLASS
Used for internal authentication.
|
static String |
EXTRA_CALLING_PACKAGE
Used for internal authentication.
|
static String |
EXTRA_CONSUMER_KEY
The extra that goes in an intent to provide your consumer key for
Dropbox authentication.
|
static String |
EXTRA_CONSUMER_SIG
Used for internal authentication.
|
static String |
EXTRA_DESIRED_UID
Used for internal authentication.
|
static String |
EXTRA_UID
The extra that goes in an intent when returning from Dropbox auth to
provide the user's Dropbox UID, if auth succeeded.
|
static android.content.Intent |
result
Used internally.
|
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, FOCUSED_STATE_SET, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, AUDIO_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_ROUTER_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, TELEPHONY_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, UI_MODE_SERVICE, USB_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
Constructor and Description |
---|
AuthActivity() |
Modifier and Type | Method and Description |
---|---|
static boolean |
checkAppBeforeAuth(android.content.Context context,
String appKey,
boolean alertUser)
Check's the current app's manifest setup for authentication.
|
static android.content.Intent |
makeIntent(android.content.Context context,
String appKey,
String webHost,
String apiType)
Create an intent which can be sent to this activity to start OAuth 2 authentication.
|
protected void |
onCreate(android.os.Bundle savedInstanceState) |
protected void |
onNewIntent(android.content.Intent intent) |
protected void |
onResume() |
protected void |
onSaveInstanceState(android.os.Bundle outState) |
static void |
setSecurityProvider(AuthActivity.SecurityProvider prov)
Sets the SecurityProvider interface to use for all AuthActivity instances.
|
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dump, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMenuInflater, getParent, getParentActivityIntent, getPreferences, getRequestedOrientation, getSystemService, getTaskId, getTitle, getTitleColor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, invalidateOptionsMenu, isChangingConfigurations, isChild, isFinishing, isTaskRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityResult, onApplyThemeResource, onAttachedToWindow, onAttachFragment, onBackPressed, onChildTitleChanged, onConfigurationChanged, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreateNavigateUpTaskStack, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onCreateView, onDestroy, onDetachedFromWindow, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLowMemory, onMenuItemSelected, onMenuOpened, onNavigateUp, onNavigateUpFromChild, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPause, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onPreparePanel, onRestart, onRestoreInstanceState, onRetainNonConfigurationInstance, onSearchRequested, onStart, onStop, onTitleChanged, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onUserLeaveHint, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, openContextMenu, openOptionsMenu, overridePendingTransition, recreate, registerForContextMenu, removeDialog, requestWindowFeature, runOnUiThread, setContentView, setContentView, setContentView, setDefaultKeyMode, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setIntent, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, shouldUpRecreateTask, showDialog, showDialog, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityForResult, startActivityForResult, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromChild, startIntentSenderFromChild, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startSearch, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkUriPermission, checkUriPermission, clearWallpaper, createPackageContext, databaseList, deleteDatabase, deleteFile, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getAssets, getBaseContext, getCacheDir, getClassLoader, getContentResolver, getDatabasePath, getDir, getExternalCacheDir, getExternalFilesDir, getFilesDir, getFileStreamPath, getMainLooper, getObbDir, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, revokeUriPermission, sendBroadcast, sendBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendStickyBroadcast, sendStickyOrderedBroadcast, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
public static final String EXTRA_CONSUMER_KEY
public static final String EXTRA_ACCESS_TOKEN
public static final String EXTRA_ACCESS_SECRET
public static final String EXTRA_UID
public static final String EXTRA_CONSUMER_SIG
public static final String EXTRA_CALLING_PACKAGE
public static final String EXTRA_CALLING_CLASS
public static final String EXTRA_AUTH_STATE
public static final String EXTRA_DESIRED_UID
public static final String EXTRA_ALREADY_AUTHED_UIDS
public static final String ACTION_AUTHENTICATE_V1
public static final String ACTION_AUTHENTICATE_V2
public static final int AUTH_VERSION
public static final String AUTH_PATH_CONNECT
public static android.content.Intent result
public static android.content.Intent makeIntent(android.content.Context context, String appKey, String webHost, String apiType)
context
- the source contextappKey
- the consumer key for the appwebHost
- the host to use for web authentication, or null for the defaultapiType
- an identifier for the type of API being supported, or null for
the defaultpublic static boolean checkAppBeforeAuth(android.content.Context context, String appKey, boolean alertUser)
context
- the app contextappKey
- the consumer key for the appalertUser
- whether to alert the user for the case where
multiple apps are conflicting.true
if this app is properly set up for authentication.public static void setSecurityProvider(AuthActivity.SecurityProvider prov)
java.security
providers
will be used instead.
You shouldn't need to use this method directly in your app. Instead,
simply configure java.security
's providers to match your preferences.
prov
- the new SecurityProvider
interface.protected void onCreate(android.os.Bundle savedInstanceState)
onCreate
in class android.app.Activity
protected void onSaveInstanceState(android.os.Bundle outState)
onSaveInstanceState
in class android.app.Activity
protected void onResume()
onResume
in class android.app.Activity
protected void onNewIntent(android.content.Intent intent)
onNewIntent
in class android.app.Activity