Class ActivityRunner

java.lang.Object
com.microblink.blinkid.uisettings.ActivityRunner

public abstract class ActivityRunner extends Object
Utility class that will start the activity associated with given UISettings
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Key for exception stored in intent when returning result with RESULT_CANCELED code.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    startActivityForResult(android.app.Activity callingActivity, int requestCode, UISettings settings)
    Starts the activity associated with this settings object for result with given request code.
    static void
    startActivityForResult(android.app.Fragment callingFragment, int requestCode, UISettings settings)
    Starts the activity associated with this settings object for result with given request code.
    static void
    startActivityForResult(androidx.fragment.app.Fragment callingFragment, int requestCode, UISettings settings)
    Starts the activity associated with this settings object for result with given request code.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • EXTRA_SCAN_EXCEPTION

      public static final String EXTRA_SCAN_EXCEPTION
      Key for exception stored in intent when returning result with RESULT_CANCELED code.
      See Also:
  • Constructor Details

    • ActivityRunner

      public ActivityRunner()
  • Method Details

    • startActivityForResult

      public static void startActivityForResult(@NonNull android.app.Activity callingActivity, int requestCode, @NonNull UISettings settings)
      Starts the activity associated with this settings object for result with given request code. This method internally prepares Intent to scan activity associated with this settings object and starts that activity by calling Activity.startActivityForResult(Intent, int) on given calling Activity.
      Parameters:
      callingActivity - Activity to which scanning result should be delivered via Activity.onActivityResult(int, int, Intent) callback.
      requestCode - Request code for Activity.startActivityForResult(Intent, int).
      settings - UISettings object that will be used to determine which activity should be run and with which parameters.
    • startActivityForResult

      public static void startActivityForResult(@NonNull android.app.Fragment callingFragment, int requestCode, @NonNull UISettings settings)
      Starts the activity associated with this settings object for result with given request code. This method internally prepares Intent to scan activity associated with this settings object and starts that activity by calling Fragment.startActivityForResult(Intent, int) on given calling Fragment.
      Parameters:
      callingFragment - Fragment to which ascanning result should be delivered via Fragment.onActivityResult(int, int, Intent) callback.
      requestCode - Request code for Fragment.startActivityForResult(Intent, int)
      settings - UISettings object that will be used to determine which activity should be run and with which parameters.
    • startActivityForResult

      public static void startActivityForResult(@NonNull androidx.fragment.app.Fragment callingFragment, int requestCode, @NonNull UISettings settings)
      Starts the activity associated with this settings object for result with given request code. This method internally prepares Intent to scan activity associated with this settings object and starts that activity by calling Fragment.startActivityForResult(Intent, int) on given calling Fragment.
      Parameters:
      callingFragment - Fragment to which scanning result should be delivered via Fragment.onActivityResult(int, int, Intent) callback.
      requestCode - Request code for Fragment.startActivityForResult(Intent, int)
      settings - UISettings object that will be used to determine which activity should be run and with which parameters.