Class ActivityRunner
java.lang.Object
com.microblink.blinkid.uisettings.ActivityRunner
Utility class that will start the activity associated with given
UISettings
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Key for exception stored in intent when returning result with RESULT_CANCELED code. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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.
-
Field Details
-
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 preparesIntent
to scan activity associated with this settings object and starts that activity by callingActivity.startActivityForResult(Intent, int)
on given callingActivity
.- Parameters:
callingActivity
- Activity to which scanning result should be delivered viaActivity.onActivityResult(int, int, Intent)
callback.requestCode
- Request code forActivity.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 preparesIntent
to scan activity associated with this settings object and starts that activity by callingFragment.startActivityForResult(Intent, int)
on given callingFragment
.- Parameters:
callingFragment
- Fragment to which ascanning result should be delivered viaFragment.onActivityResult(int, int, Intent)
callback.requestCode
- Request code forFragment.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 preparesIntent
to scan activity associated with this settings object and starts that activity by callingFragment.startActivityForResult(Intent, int)
on given callingFragment
.- Parameters:
callingFragment
- Fragment to which scanning result should be delivered viaFragment.onActivityResult(int, int, Intent)
callback.requestCode
- Request code forFragment.startActivityForResult(Intent, int)
settings
-UISettings
object that will be used to determine which activity should be run and with which parameters.
-