public final class CardIOActivity extends Activity
Modifier and Type | Field and Description |
---|---|
static String |
EXTRA_CAPTURED_CARD_IMAGE
String extra.
|
static String |
EXTRA_GUIDE_COLOR
Integer extra.
|
static String |
EXTRA_HIDE_CARDIO_LOGO
Boolean extra.
|
static String |
EXTRA_KEEP_APPLICATION_THEME
Boolean extra.
|
static String |
EXTRA_LANGUAGE_OR_LOCALE
String extra.
|
static String |
EXTRA_NO_CAMERA
Boolean extra.
|
static String |
EXTRA_REQUIRE_CARDHOLDER_NAME
Boolean extra.
|
static String |
EXTRA_REQUIRE_CVV
Boolean extra.
|
static String |
EXTRA_REQUIRE_EXPIRY
Boolean extra.
|
static String |
EXTRA_REQUIRE_POSTAL_CODE
Boolean extra.
|
static String |
EXTRA_RESTRICT_POSTAL_CODE_TO_NUMERIC_ONLY
Boolean extra.
|
static String |
EXTRA_RETURN_CARD_IMAGE
Boolean extra.
|
static String |
EXTRA_SCAN_EXPIRY
Boolean extra.
|
static String |
EXTRA_SCAN_INSTRUCTIONS
String extra.
|
static String |
EXTRA_SCAN_OVERLAY_LAYOUT_ID
Integer extra.
|
static String |
EXTRA_SCAN_RESULT
Parcelable extra containing
CreditCard . |
static String |
EXTRA_SUPPRESS_CONFIRMATION
Boolean extra.
|
static String |
EXTRA_SUPPRESS_MANUAL_ENTRY
Boolean extra.
|
static String |
EXTRA_SUPPRESS_SCAN
Boolean extra.
|
static String |
EXTRA_UNBLUR_DIGITS
Integer extra.
|
static String |
EXTRA_USE_CARDIO_LOGO
Boolean extra.
|
static String |
EXTRA_USE_PAYPAL_ACTIONBAR_ICON
Boolean extra.
|
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, CONNECTIVITY_SERVICE, CONSUMER_IR_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DISPLAY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, FINGERPRINT_SERVICE, HARDWARE_PROPERTIES_SERVICE, INPUT_METHOD_SERVICE, INPUT_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, RESTRICTIONS_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, SYSTEM_HEALTH_SERVICE, TELECOM_SERVICE, TELEPHONY_SERVICE, TELEPHONY_SUBSCRIPTION_SERVICE, TEXT_SERVICES_MANAGER_SERVICE, TV_INPUT_SERVICE, UI_MODE_SERVICE, USAGE_STATS_SERVICE, USB_SERVICE, USER_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_P2P_SERVICE, WIFI_SERVICE, WINDOW_SERVICE
TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN
Constructor and Description |
---|
CardIOActivity() |
Modifier and Type | Method and Description |
---|---|
static boolean |
canReadCardWithCamera()
Determine if the device supports card scanning.
|
static Bitmap |
getCapturedCardImage(Intent intent)
Utility method for decoding card bitmap
|
Rect |
getTorchRect() |
void |
onBackPressed()
|
void |
onRequestPermissionsResult(int requestCode,
String[] permissions,
int[] grantResults) |
static Date |
sdkBuildDate()
Returns the time this SDK was built.
|
static String |
sdkVersion()
Returns the String version of this SDK.
|
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dismissKeyboardShortcutsHelper, dispatchGenericMotionEvent, dispatchKeyEvent, dispatchKeyShortcutEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, dump, enterPictureInPictureMode, findViewById, finish, finishActivity, finishActivityFromChild, finishAffinity, finishAfterTransition, finishAndRemoveTask, finishFromChild, getActionBar, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getContentScene, getContentTransitionManager, getCurrentFocus, getFragmentManager, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLoaderManager, getLocalClassName, getMediaController, getMenuInflater, getParent, getParentActivityIntent, getPreferences, getReferrer, getRequestedOrientation, getSearchEvent, getSystemService, getTaskId, getTitle, getTitleColor, getVoiceInteractor, getVolumeControlStream, getWindow, getWindowManager, hasWindowFocus, invalidateOptionsMenu, 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, onNavigateUp, onNavigateUpFromChild, onOptionsItemSelected, onOptionsMenuClosed, onPanelClosed, 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, runOnUiThread, setActionBar, setContentTransitionManager, setContentView, setContentView, setContentView, setDefaultKeyMode, setEnterSharedElementCallback, setExitSharedElementCallback, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setFinishOnTouchOutside, setImmersive, setIntent, setMediaController, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTaskDescription, setTheme, setTitle, setTitle, setTitleColor, 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, 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, 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, removeStickyBroadcast, removeStickyBroadcastAsUser, revokeUriPermission, sendBroadcast, sendBroadcast, sendBroadcastAsUser, sendBroadcastAsUser, sendOrderedBroadcast, sendOrderedBroadcast, sendOrderedBroadcastAsUser, sendStickyBroadcast, sendStickyBroadcastAsUser, sendStickyOrderedBroadcast, sendStickyOrderedBroadcastAsUser, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver
getColor, getColorStateList, getDrawable, getString, getString, getSystemService, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, registerComponentCallbacks, unregisterComponentCallbacks
public static final String EXTRA_NO_CAMERA
false
. If set, the card will not be scanned
with the camera.public static final String EXTRA_REQUIRE_EXPIRY
false
. If
set to false
, expiry information will not be required.public static final 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 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 String EXTRA_REQUIRE_CVV
false
. If set, the user will be prompted
for the card CVV.public static final String EXTRA_REQUIRE_POSTAL_CODE
false
. If set, the user will be prompted
for the card billing postal code.public static final 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 String EXTRA_REQUIRE_CARDHOLDER_NAME
false
. If set, the user will be prompted
for the cardholder name.public static final String EXTRA_USE_CARDIO_LOGO
false
. If set, the card.io logo will be
shown instead of the PayPal logo.public static final 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 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 String EXTRA_LANGUAGE_OR_LOCALE
public static final String EXTRA_GUIDE_COLOR
Color.GREEN
. Changes the color of the guide overlay on the
camera.public static final String EXTRA_SUPPRESS_CONFIRMATION
true
the user will not be prompted to
confirm their card number after processing.public static final 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 String EXTRA_SCAN_INSTRUCTIONS
public static final String EXTRA_SUPPRESS_SCAN
true
the CardIOActivity
will finish with a RESULT_SCAN_SUPPRESSED
result code.public static final 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 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 String EXTRA_SCAN_OVERLAY_LAYOUT_ID
public static final String EXTRA_USE_PAYPAL_ACTIONBAR_ICON
public static final 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, String[] permissions, int[] grantResults)
onRequestPermissionsResult
in class 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 Activity
public static boolean canReadCardWithCamera()
true
if camera is supported. false
otherwise.public static String sdkVersion()
public static Date sdkBuildDate()
public static Bitmap getCapturedCardImage(Intent intent)
intent
- - intent received in Activity.onActivityResult(int, int, Intent)
public Rect getTorchRect()
Copyright © 2012-2016 PayPal, Inc. All Rights Reserved.