|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectandroid.content.Context
android.content.ContextWrapper
android.view.ContextThemeWrapper
android.app.Activity
com.google.zxing.client.android.CaptureActivity
public final class CaptureActivity
This activity opens the camera and does the actual scanning on a background thread. It draws a viewfinder to help the user place the barcode correctly, shows feedback as the image processing is happening, and then overlays the results when a scan is successful.
Field Summary | |
---|---|
static int |
HISTORY_REQUEST_CODE
|
Fields inherited from class android.app.Activity |
---|
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 |
Fields inherited from class android.content.Context |
---|
ACCESSIBILITY_SERVICE, ACCOUNT_SERVICE, ACTIVITY_SERVICE, ALARM_SERVICE, AUDIO_SERVICE, BIND_AUTO_CREATE, BIND_DEBUG_UNBIND, BIND_NOT_FOREGROUND, CLIPBOARD_SERVICE, CONNECTIVITY_SERVICE, CONTEXT_IGNORE_SECURITY, CONTEXT_INCLUDE_CODE, CONTEXT_RESTRICTED, DEVICE_POLICY_SERVICE, DOWNLOAD_SERVICE, DROPBOX_SERVICE, INPUT_METHOD_SERVICE, KEYGUARD_SERVICE, LAYOUT_INFLATER_SERVICE, LOCATION_SERVICE, MODE_APPEND, MODE_PRIVATE, MODE_WORLD_READABLE, MODE_WORLD_WRITEABLE, NFC_SERVICE, NOTIFICATION_SERVICE, POWER_SERVICE, SEARCH_SERVICE, SENSOR_SERVICE, STORAGE_SERVICE, TELEPHONY_SERVICE, UI_MODE_SERVICE, VIBRATOR_SERVICE, WALLPAPER_SERVICE, WIFI_SERVICE, WINDOW_SERVICE |
Constructor Summary | |
---|---|
CaptureActivity()
|
Method Summary | |
---|---|
void |
drawViewfinder()
|
android.os.Handler |
getHandler()
|
void |
handleDecode(Result rawResult,
android.graphics.Bitmap barcode)
A valid barcode has been found, so give an indication of success and show the results. |
void |
onActivityResult(int requestCode,
int resultCode,
android.content.Intent intent)
|
void |
onCreate(android.os.Bundle icicle)
|
boolean |
onCreateOptionsMenu(android.view.Menu menu)
|
protected void |
onDestroy()
|
boolean |
onKeyDown(int keyCode,
android.view.KeyEvent event)
|
boolean |
onOptionsItemSelected(android.view.MenuItem item)
|
protected void |
onPause()
|
boolean |
onPrepareOptionsMenu(android.view.Menu menu)
|
protected void |
onResume()
|
void |
restartPreviewAfterDelay(long delayMS)
|
void |
surfaceChanged(android.view.SurfaceHolder holder,
int format,
int width,
int height)
|
void |
surfaceCreated(android.view.SurfaceHolder holder)
|
void |
surfaceDestroyed(android.view.SurfaceHolder holder)
|
Methods inherited from class android.app.Activity |
---|
addContentView, closeContextMenu, closeOptionsMenu, createPendingResult, dismissDialog, dispatchKeyEvent, dispatchPopulateAccessibilityEvent, dispatchTouchEvent, dispatchTrackballEvent, findViewById, finish, finishActivity, finishActivityFromChild, finishFromChild, getApplication, getCallingActivity, getCallingPackage, getChangingConfigurations, getComponentName, getCurrentFocus, getInstanceCount, getIntent, getLastNonConfigurationInstance, getLayoutInflater, getLocalClassName, getMenuInflater, getParent, getPreferences, getRequestedOrientation, getSystemService, getTaskId, getTitle, getTitleColor, getVolumeControlStream, getWallpaperDesiredMinimumHeight, getWallpaperDesiredMinimumWidth, getWindow, getWindowManager, hasWindowFocus, isChild, isFinishing, isTaskRoot, managedQuery, moveTaskToBack, onApplyThemeResource, onAttachedToWindow, onBackPressed, onChildTitleChanged, onConfigurationChanged, onContentChanged, onContextItemSelected, onContextMenuClosed, onCreateContextMenu, onCreateDescription, onCreateDialog, onCreateDialog, onCreatePanelMenu, onCreatePanelView, onCreateThumbnail, onCreateView, onDetachedFromWindow, onKeyLongPress, onKeyMultiple, onKeyUp, onLowMemory, onMenuItemSelected, onMenuOpened, onNewIntent, onOptionsMenuClosed, onPanelClosed, onPostCreate, onPostResume, onPrepareDialog, onPrepareDialog, onPreparePanel, onRestart, onRestoreInstanceState, onRetainNonConfigurationInstance, onSaveInstanceState, onSearchRequested, onStart, onStop, onTitleChanged, onTouchEvent, onTrackballEvent, onUserInteraction, onUserLeaveHint, onWindowAttributesChanged, onWindowFocusChanged, openContextMenu, openOptionsMenu, overridePendingTransition, registerForContextMenu, removeDialog, requestWindowFeature, runOnUiThread, setContentView, setContentView, setContentView, setDefaultKeyMode, setFeatureDrawable, setFeatureDrawableAlpha, setFeatureDrawableResource, setFeatureDrawableUri, setIntent, setPersistent, setProgress, setProgressBarIndeterminate, setProgressBarIndeterminateVisibility, setProgressBarVisibility, setRequestedOrientation, setResult, setResult, setSecondaryProgress, setTitle, setTitle, setTitleColor, setVisible, setVolumeControlStream, showDialog, showDialog, startActivity, startActivityForResult, startActivityFromChild, startActivityIfNeeded, startIntentSender, startIntentSenderForResult, startIntentSenderFromChild, startManagingCursor, startNextMatchingActivity, startSearch, stopManagingCursor, takeKeyEvents, triggerSearch, unregisterForContextMenu |
Methods inherited from class android.view.ContextThemeWrapper |
---|
attachBaseContext, getTheme, setTheme |
Methods inherited from class android.content.ContextWrapper |
---|
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, getPackageCodePath, getPackageManager, getPackageName, getPackageResourcePath, getResources, getSharedPreferences, getWallpaper, grantUriPermission, isRestricted, openFileInput, openFileOutput, openOrCreateDatabase, peekWallpaper, registerReceiver, registerReceiver, removeStickyBroadcast, revokeUriPermission, sendBroadcast, sendBroadcast, sendOrderedBroadcast, sendOrderedBroadcast, sendStickyBroadcast, sendStickyOrderedBroadcast, setWallpaper, setWallpaper, startInstrumentation, startService, stopService, unbindService, unregisterReceiver |
Methods inherited from class android.content.Context |
---|
getString, getString, getText, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes, obtainStyledAttributes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int HISTORY_REQUEST_CODE
Constructor Detail |
---|
public CaptureActivity()
Method Detail |
---|
public android.os.Handler getHandler()
public void onCreate(android.os.Bundle icicle)
onCreate
in class android.app.Activity
protected void onResume()
onResume
in class android.app.Activity
protected void onPause()
onPause
in class android.app.Activity
protected void onDestroy()
onDestroy
in class android.app.Activity
public boolean onKeyDown(int keyCode, android.view.KeyEvent event)
onKeyDown
in interface android.view.KeyEvent.Callback
onKeyDown
in class android.app.Activity
public boolean onCreateOptionsMenu(android.view.Menu menu)
onCreateOptionsMenu
in class android.app.Activity
public boolean onPrepareOptionsMenu(android.view.Menu menu)
onPrepareOptionsMenu
in class android.app.Activity
public boolean onOptionsItemSelected(android.view.MenuItem item)
onOptionsItemSelected
in class android.app.Activity
public void onActivityResult(int requestCode, int resultCode, android.content.Intent intent)
onActivityResult
in class android.app.Activity
public void surfaceCreated(android.view.SurfaceHolder holder)
surfaceCreated
in interface android.view.SurfaceHolder.Callback
public void surfaceDestroyed(android.view.SurfaceHolder holder)
surfaceDestroyed
in interface android.view.SurfaceHolder.Callback
public void surfaceChanged(android.view.SurfaceHolder holder, int format, int width, int height)
surfaceChanged
in interface android.view.SurfaceHolder.Callback
public void handleDecode(Result rawResult, android.graphics.Bitmap barcode)
rawResult
- The contents of the barcode.barcode
- A greyscale bitmap of the camera data which was decoded.public void restartPreviewAfterDelay(long delayMS)
public void drawViewfinder()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |