bitpay / cordova-plugin-qrscanner

A fast, energy efficient, highly-configurable QR code scanner for Cordova apps and the browser.
MIT License
575 stars 783 forks source link

import android.support.v4.app.ActivityCompat; #319

Open linlak opened 4 years ago

linlak commented 4 years ago

Error on line 27 of QRScanner.java fixed with import androidx.core.app.ActivityCompat; but keeps it keeps changing every time I execute npx cap sync private boolean hasCamera() { if (this.cordova.getActivity().getPackageManager().hasSystemFeature(PackageManager.FEATURE_CAMERA)){ return true; } else { return false; } } use FEATURE_CAMERA_ANY

TheCorbin commented 4 years ago

@linlak any progress on this? I'm staring down the same issue.

SavageCore commented 4 years ago

You can use jetify to convert to androidx, as below:

npm install --save-dev jetifier
npx jetify
npx cap sync

As a bonus set your postinstall script "postinstall": "jetifier" in package.json