Skip to content

Commit

Permalink
Use context instead of activity from Plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmangubat23 committed Mar 3, 2021
1 parent fd5aaac commit 0b895e8
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ class SmartScannerPlugin : Plugin() {
saveCall(call)
if (action == "START_SCANNER") {
Timber.d("executeScanner %s", action)
val activity: Activity = activity
val intent = Intent(activity, SmartScannerActivity::class.java)
val intent = Intent(context, SmartScannerActivity::class.java)
val scannerOptions = Gson().fromJson(options.toString(), ScannerOptions::class.java)
intent.putExtra(SmartScannerActivity.SCANNER_OPTIONS, scannerOptions)
startActivityForResult(call, intent, REQUEST_OP_SCANNER)
Expand Down

0 comments on commit 0b895e8

Please sign in to comment.