public final class CardScannerActivity
extends android.app.Activity
Activity
for a card.io client to use card.io.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXTRA_CAPTURED_CARD_IMAGE
String extra.
|
static java.lang.String |
EXTRA_CARD_BACK_SIDE_IMAGE |
static java.lang.String |
EXTRA_CARD_FRONT_SIDE_IMAGE
Boolean extra.
|
static java.lang.String |
EXTRA_GUIDE_COLOR
Integer extra.
|
static java.lang.String |
EXTRA_HIDE_CARDIO_LOGO
Boolean extra.
|
static java.lang.String |
EXTRA_KEEP_APPLICATION_THEME
Boolean extra.
|
static java.lang.String |
EXTRA_LANGUAGE_OR_LOCALE
String extra.
|
static java.lang.String |
EXTRA_NO_CAMERA |
static java.lang.String |
EXTRA_REQUIRE_CARDHOLDER_NAME
Boolean extra.
|
static java.lang.String |
EXTRA_REQUIRE_CVV
Boolean extra.
|
static java.lang.String |
EXTRA_REQUIRE_EXPIRY
Boolean extra.
|
static java.lang.String |
EXTRA_REQUIRE_POSTAL_CODE
Boolean extra.
|
static java.lang.String |
EXTRA_RESTRICT_POSTAL_CODE_TO_NUMERIC_ONLY
Boolean extra.
|
static java.lang.String |
EXTRA_RETURN_CARD_IMAGE
Boolean extra.
|
static java.lang.String |
EXTRA_SCAN_EXPIRY
Boolean extra.
|
static java.lang.String |
EXTRA_SCAN_INSTRUCTIONS
String extra.
|
static java.lang.String |
EXTRA_SCAN_OVERLAY_LAYOUT_ID
Integer extra.
|
static java.lang.String |
EXTRA_SCAN_RESULT
Parcelable extra containing
CreditCard . |
static java.lang.String |
EXTRA_SUPPRESS_CONFIRMATION
Boolean extra.
|
static java.lang.String |
EXTRA_SUPPRESS_MANUAL_ENTRY
Boolean extra.
|
static java.lang.String |
EXTRA_SUPPRESS_SCAN
Boolean extra.
|
static java.lang.String |
EXTRA_UNBLUR_DIGITS
Integer extra.
|
static java.lang.String |
EXTRA_USE_CARDIO_LOGO
Boolean extra.
|
static java.lang.String |
EXTRA_USE_PAYPAL_ACTIONBAR_ICON
Boolean extra.
|
static java.lang.String |
FACEOFF_CARD_CONFIG |
static java.lang.String |
FACEOFF_RESULT_BUNDLE |
static int |
RESULT_CARD_INFO
result code supplied to
Activity.onActivityResult(int, int, Intent) when a scan request completes. |
static int |
RESULT_CONFIRMATION_SUPPRESSED
result code indicating that confirmation was suppressed.
|
static int |
RESULT_ENTRY_CANCELED
result code supplied to
Activity.onActivityResult(int, int, Intent) when the user presses the cancel
button. |
static int |
RESULT_SCAN_NOT_AVAILABLE
result code indicating that scan is not available.
|
static int |
RESULT_SCAN_SUPPRESSED
result code indicating that we only captured the card image.
|
DEFAULT_KEYS_DIALER, DEFAULT_KEYS_DISABLE, DEFAULT_KEYS_SEARCH_GLOBAL, DEFAULT_KEYS_SEARCH_LOCAL, DEFAULT_KEYS_SHORTCUT, RESULT_CANCELED, RESULT_FIRST_USER, RESULT_OK
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, APP_OPS_SERVICE, APPWIDGET_SERVICE, AUDIO_SERVICE, BATTERY_SERVICE, BIND_ABOVE_CLIENT, BIND_ADJUST_WITH_ACTIVITY, BIND_ALLOW_OOM_MANAGEMENT, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_EXTERNAL_SERVICE, BIND_IMPORTANT, BIND_NOT_FOREGROUND, BIND_WAIVE_PRIORITY, BLUETOOTH_SERVICE, CAMERA_SERVICE, CAPTIONING_SERVICE, CARRIER_CONFIG_SERVICE, CLIPBOARD_SERVICE, COMPANION_DEVICE_SERVICE, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, CROSS_PROFILE_APPS_SERVICE, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, EUICC_SERVICE, FINGERPRINT_SERVICE, HARDWARE_PROPERTIES_SERVICE, INPUT_METHOD_SERVICE, INPUT_SERVICE, IPSEC_SERVICE, JOB_SCHEDULER_SERVICE, KEYGUARD_SERVICE, LAUNCHER_APPS_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MEDIA_PROJECTION_SERVICE, MEDIA_ROUTER_SERVICE, MEDIA_SESSION_SERVICE, MIDI_SERVICE, MODE_APPEND, MODE_ENABLE_WRITE_AHEAD_LOGGING, MODE_MULTI_PROCESS, MODE_NO_LOCALIZED_COLLATORS, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NETWORK_STATS_SERVICE, NFC_SERVICE, NOTIFICATION_SERVICE, NSD_SERVICE, POWER_SERVICE, PRINT_SERVICE, RECEIVER_VISIBLE_TO_INSTANT_APPS, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, SHORTCUT_SERVICE, STORAGE_SERVICE, STORAGE_STATS_SERVICE, SYSTEM_HEALTH_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_CLASSIFICATION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_AWARE_SERVICE, WIFI_P2P_SERVICE, WIFI_RTT_RANGING_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
Constructor and Description |
---|
CardScannerActivity() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canReadCardWithCamera()
Determine if the device supports card scanning.
|
static android.graphics.Bitmap |
getCapturedCardImage(android.content.Intent intent)
Utility method for decoding card bitmap
|
android.graphics.Rect |
getTorchRect() |
void |
onBackPressed()
This
Activity overrides back button handling to handle back presses properly given the
various states this Activity can be in. |
void |
onRequestPermissionsResult(int requestCode,
java.lang.String[] permissions,
int[] grantResults) |
static java.util.Date |
sdkBuildDate()
Deprecated.
Always returns
new Date() . |
static java.lang.String |
sdkVersion()
Returns the String version of this SDK.
|
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dismissKeyboardShortcutsHelper, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dump, enterPictureInPictureMode, enterPictureInPictureMode, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMaxNumPictureInPictureActions, getMediaController, getMenuInflater, getParent, getParentActivityIntent, getPreferences, getReferrer, getRequestedOrientation, getSearchEvent, getSystemService, getTaskId, getTitle, getTitleColor, getVoiceInteractor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, invalidateOptionsMenu, isActivityTransitionRunning, isChangingConfigurations, isChild, isDestroyed, isFinishing, isImmersive, isInMultiWindowMode, isInPictureInPictureMode, isLocalVoiceInteractionSupported, isTaskRoot, isVoiceInteraction, isVoiceInteractionRoot, managedQuery, moveTaskToBack, navigateUpTo, navigateUpToFromChild, onActionModeFinished, onActionModeStarted, onActivityReenter, onAttachedToWindow, onAttachFragment, onConfigurationChanged, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreate, onCreateContextMenu, onCreateDescription, onCreateNavigateUpTaskStack, onCreateOptionsMenu, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onCreateView, onDetachedFromWindow, onEnterAnimationComplete, onGenericMotionEvent, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyShortcut, onKeyUp, onLocalVoiceInteractionStarted, onLocalVoiceInteractionStopped, onLowMemory, onMenuItemSelected, onMenuOpened, onMultiWindowModeChanged, onMultiWindowModeChanged, onNavigateUp, onNavigateUpFromChild, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, onPictureInPictureModeChanged, onPictureInPictureModeChanged, onPostCreate, onPrepareNavigateUpTaskStack, onPrepareOptionsMenu, onPreparePanel, onProvideAssistContent, onProvideAssistData, onProvideKeyboardShortcuts, onProvideReferrer, onRestoreInstanceState, onRetainNonConfigurationInstance, onSaveInstanceState, onSearchRequested, onSearchRequested, onStateNotSaved, onTouchEvent, onTrackballEvent, onTrimMemory, onUserInteraction, onVisibleBehindCanceled, onWindowAttributesChanged, onWindowFocusChanged, onWindowStartingActionMode, onWindowStartingActionMode, openContextMenu, openOptionsMenu, overridePendingTransition, postponeEnterTransition, recreate, registerForContextMenu, releaseInstance, removeDialog, reportFullyDrawn, requestDragAndDropPermissions, requestPermissions, requestShowKeyboardShortcuts, requestVisibleBehind, requestWindowFeature, requireViewById, runOnUiThread, setActionBar, setContentTransitionManager, setContentView, setContentView, setContentView, setDefaultKeyMode, setEnterSharedElementCallback, setExitSharedElementCallback, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setIntent, setMediaController, setPictureInPictureParams, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setShowWhenLocked, setTaskDescription, setTheme, setTitle, setTitle, setTitleColor, setTurnScreenOn, setVisible, setVolumeControlStream, setVrModeEnabled, shouldShowRequestPermissionRationale, shouldUpRecreateTask, showAssist, showDialog, showDialog, showLockTaskEscapeMessage, startActionMode, startActionMode, startActivities, startActivities, startActivity, startActivity, startActivityForResult, startActivityForResult, startActivityFromChild, startActivityFromChild, startActivityFromFragment, startActivityFromFragment, startActivityIfNeeded, startActivityIfNeeded, startIntentSender, startIntentSender, startIntentSenderForResult, startIntentSenderForResult, startIntentSenderFromChild, startIntentSenderFromChild, startLocalVoiceInteraction, startLockTask, startManagingCursor, startNextMatchingActivity, startNextMatchingActivity, startPostponedEnterTransition, startSearch, stopLocalVoiceInteraction, stopLockTask, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu
applyOverrideConfiguration, getAssets, getResources, getTheme
bindService, checkCallingOrSelfPermission, checkCallingOrSelfUriPermission, checkCallingPermission, checkCallingUriPermission, checkPermission, checkSelfPermission, checkUriPermission, checkUriPermission, clearWallpaper, createConfigurationContext, createContextForSplit, createDeviceProtectedStorageContext, createDisplayContext, createPackageContext, databaseList, deleteDatabase, deleteFile, deleteSharedPreferences, enforceCallingOrSelfPermission, enforceCallingOrSelfUriPermission, enforceCallingPermission, enforceCallingUriPermission, enforcePermission, enforceUriPermission, enforceUriPermission, fileList, getApplicationContext, getApplicationInfo, getBaseContext, getCacheDir, getClassLoader, getCodeCacheDir, getContentResolver, getDatabasePath, getDataDir, getDir, getExternalCacheDir, getExternalCacheDirs, getExternalFilesDir, getExternalFilesDirs, getExternalMediaDirs, getFilesDir, getFileStreamPath, getMainExecutor, getMainLooper, getNoBackupFilesDir, getObbDir, getObbDirs, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getSharedPreferences, getSystemServiceName, getWallpaper, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, grantUriPermission, isDeviceProtectedStorage, isRestricted, moveDatabaseFrom, moveSharedPreferencesFrom, openFileInput, openFileOutput, openOrCreateDatabase, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, registerReceiver, registerReceiver, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startForegroundService, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
getColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbacks
public static final java.lang.String FACEOFF_CARD_CONFIG
public static final java.lang.String FACEOFF_RESULT_BUNDLE
public static final java.lang.String EXTRA_CARD_FRONT_SIDE_IMAGE
false
. If set, the card will not be scanned
with the camera.public static final java.lang.String EXTRA_CARD_BACK_SIDE_IMAGE
public static final java.lang.String EXTRA_NO_CAMERA
public static final java.lang.String EXTRA_REQUIRE_EXPIRY
false
. If
set to false
, expiry information will not be required.public static final java.lang.String EXTRA_SCAN_EXPIRY
true
. If
set to true
, and EXTRA_REQUIRE_EXPIRY
is true
,
an attempt to extract the expiry from the card image will be made.public static final java.lang.String EXTRA_UNBLUR_DIGITS
-1
(no blur). Privacy feature.
How many of the Card number digits NOT to blur on the resulting image.
Setting it to 4
will blur all digits except the last four.public static final java.lang.String EXTRA_REQUIRE_CVV
false
. If set, the user will be prompted
for the card CVV.public static final java.lang.String EXTRA_REQUIRE_POSTAL_CODE
false
. If set, the user will be prompted
for the card billing postal code.public static final java.lang.String EXTRA_RESTRICT_POSTAL_CODE_TO_NUMERIC_ONLY
false
. If set, the postal code will only collect numeric
input. Set this if you know the expected country's
postal code has only numeric postal codes.public static final java.lang.String EXTRA_REQUIRE_CARDHOLDER_NAME
false
. If set, the user will be prompted
for the cardholder name.public static final java.lang.String EXTRA_USE_CARDIO_LOGO
false
. If set, the card.io logo will be
shown instead of the PayPal logo.public static final java.lang.String EXTRA_SCAN_RESULT
CreditCard
. The data intent returned to your Activity
's
Activity.onActivityResult(int, int, Intent)
will contain this extra if the resultCode is
RESULT_CARD_INFO
.public static final java.lang.String EXTRA_SUPPRESS_MANUAL_ENTRY
false
. Removes the keyboard button from the
scan screen.
Activity
result will be RESULT_SCAN_NOT_AVAILABLE
.public static final java.lang.String EXTRA_LANGUAGE_OR_LOCALE
public static final java.lang.String EXTRA_GUIDE_COLOR
Color.GREEN
. Changes the color of the guide overlay on the
camera.public static final java.lang.String EXTRA_SUPPRESS_CONFIRMATION
true
the user will not be prompted to
confirm their card number after processing.public static final java.lang.String EXTRA_HIDE_CARDIO_LOGO
false
. When set to true
the card.io logo
will not be shown overlaid on the camera.public static final java.lang.String EXTRA_SCAN_INSTRUCTIONS
public static final java.lang.String EXTRA_SUPPRESS_SCAN
true
the CardScannerActivity
will finish with a RESULT_SCAN_SUPPRESSED
result code.public static final java.lang.String EXTRA_CAPTURED_CARD_IMAGE
EXTRA_RETURN_CARD_IMAGE
is set to true
, the data intent passed to your
Activity
will have the card image stored as a JPEG formatted byte array in this extra.public static final java.lang.String EXTRA_RETURN_CARD_IMAGE
true
the card image will be passed as an
extra in the data intent that is returned to your Activity
using the
EXTRA_CAPTURED_CARD_IMAGE
key.public static final java.lang.String EXTRA_SCAN_OVERLAY_LAYOUT_ID
public static final java.lang.String EXTRA_USE_PAYPAL_ACTIONBAR_ICON
public static final java.lang.String EXTRA_KEEP_APPLICATION_THEME
true
, and the application has a theme,
the theme for the card.io Activity
s will be set to the theme of the application.public static final int RESULT_CARD_INFO
Activity.onActivityResult(int, int, Intent)
when a scan request completes.public static final int RESULT_ENTRY_CANCELED
Activity.onActivityResult(int, int, Intent)
when the user presses the cancel
button.public static final int RESULT_SCAN_NOT_AVAILABLE
EXTRA_SUPPRESS_MANUAL_ENTRY
is set and scanning is not available.
canReadCardWithCamera()
.public static final int RESULT_SCAN_SUPPRESSED
public static final int RESULT_CONFIRMATION_SUPPRESSED
public void onRequestPermissionsResult(int requestCode, java.lang.String[] permissions, int[] grantResults)
onRequestPermissionsResult
in class android.app.Activity
public void onBackPressed()
Activity
overrides back button handling to handle back presses properly given the
various states this Activity
can be in.
onBackPressed
in class android.app.Activity
public static boolean canReadCardWithCamera()
true
if camera is supported. false
otherwise.public static java.lang.String sdkVersion()
@Deprecated public static java.util.Date sdkBuildDate()
new Date()
.public static android.graphics.Bitmap getCapturedCardImage(android.content.Intent intent)
intent
- - intent received in Activity.onActivityResult(int, int, Intent)
public android.graphics.Rect getTorchRect()
Copyright © 2012 PayPal, Inc. All Rights Reserved.