com.google.zxing.client.android.common.executor.AsyncTaskExecManager Java Examples

The following examples show how to use com.google.zxing.client.android.common.executor.AsyncTaskExecManager. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: SupplementalInfoRetriever.java    From reacteu-app with MIT License 6 votes vote down vote up
public static void maybeInvokeRetrieval(TextView textView,
                                        ParsedResult result,
                                        HistoryManager historyManager,
                                        Context context) {
  AsyncTaskExecInterface taskExec = new AsyncTaskExecManager().build();
  if (result instanceof URIParsedResult) {
    taskExec.execute(new URIResultInfoRetriever(textView, (URIParsedResult) result, historyManager, context));
    taskExec.execute(new TitleRetriever(textView, (URIParsedResult) result, historyManager));
  } else if (result instanceof ProductParsedResult) {
    String productID = ((ProductParsedResult) result).getProductID();
    taskExec.execute(new ProductResultInfoRetriever(textView, productID, historyManager, context));
  } else if (result instanceof ISBNParsedResult) {
    String isbn = ((ISBNParsedResult) result).getISBN();
    taskExec.execute(new ProductResultInfoRetriever(textView, isbn, historyManager, context));
    taskExec.execute(new BookResultInfoRetriever(textView, isbn, historyManager, context));
  }
}
 
Example #2
Source File: AutoFocusManager.java    From appinventor-extensions with Apache License 2.0 5 votes vote down vote up
AutoFocusManager(Context context, Camera camera) {
  this.camera = camera;
  taskExec = new AsyncTaskExecManager().build();
  SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
  String currentFocusMode = camera.getParameters().getFocusMode();
  useAutoFocus =
      FOCUS_MODES_CALLING_AF.contains(currentFocusMode);
  Log.i(TAG, "Current focus mode '" + currentFocusMode + "'; use auto focus? " + useAutoFocus);
  start();
}
 
Example #3
Source File: AutoFocusManager.java    From reacteu-app with MIT License 5 votes vote down vote up
AutoFocusManager(Context context, Camera camera) {
  this.camera = camera;
  taskExec = new AsyncTaskExecManager().build();
  SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);
  String currentFocusMode = camera.getParameters().getFocusMode();
  useAutoFocus =
      sharedPrefs.getBoolean(PreferencesActivity.KEY_AUTO_FOCUS, true) &&
      FOCUS_MODES_CALLING_AF.contains(currentFocusMode);
  Log.i(TAG, "Current focus mode '" + currentFocusMode + "'; use auto focus? " + useAutoFocus);
  start();
}
 
Example #4
Source File: AutoFocusManager.java    From camera2QRcodeReader with MIT License 5 votes vote down vote up
AutoFocusManager(Context context, Camera camera) {
  this.camera = camera;
  taskExec = new AsyncTaskExecManager().build();
  //SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context); // No need to get SharedPreferences
  String currentFocusMode = camera.getParameters().getFocusMode();
  useAutoFocus =
      /*sharedPrefs.getBoolean(PreferencesActivity.KEY_AUTO_FOCUS, true) &&*/ // No need to get SharedPreferences
      FOCUS_MODES_CALLING_AF.contains(currentFocusMode);
  Log.i(TAG, "Current focus mode '" + currentFocusMode + "'; use auto focus? " + useAutoFocus);
  start();
}
 
Example #5
Source File: InactivityTimer.java    From appinventor-extensions with Apache License 2.0 4 votes vote down vote up
InactivityTimer(Activity activity) {
  this.activity = activity;
  taskExec = new AsyncTaskExecManager().build();
  powerStatusReceiver = new PowerStatusReceiver();
  onActivity();
}
 
Example #6
Source File: SearchBookContentsActivity.java    From reacteu-app with MIT License 4 votes vote down vote up
public SearchBookContentsActivity() {
  taskExec = new AsyncTaskExecManager().build();
}
 
Example #7
Source File: AppPickerActivity.java    From reacteu-app with MIT License 4 votes vote down vote up
public AppPickerActivity() {
  labelsPackages = new ArrayList<String[]>();
  taskExec = new AsyncTaskExecManager().build();
}
 
Example #8
Source File: InactivityTimer.java    From reacteu-app with MIT License 4 votes vote down vote up
InactivityTimer(Activity activity) {
  this.activity = activity;
  taskExec = new AsyncTaskExecManager().build();
  powerStatusReceiver = new PowerStatusReceiver();
  onActivity();
}
 
Example #9
Source File: WifiResultHandler.java    From reacteu-app with MIT License 4 votes vote down vote up
public WifiResultHandler(CaptureActivity activity, ParsedResult result) {
  super(activity, result);
  parent = activity;
  taskExec = new AsyncTaskExecManager().build();
}