| 1234567891011121314151617181920212223242526272829303132333435363738 |
- const fs = require("fs");
- const path = require("path");
- const https = require("https");
- module.exports = function (context) {
- const projectRoot = context.opts.projectRoot;
- let srcPath = path.resolve(
- projectRoot,
- "platforms",
- "android",
- "app",
- "src",
- "main",
- "java",
- "com",
- "bitpay",
- "cordova",
- "qrscanner",
- "QRScanner.java"
- );
- if (fs.existsSync(srcPath)) {
- fs.writeFileSync(
- srcPath,
- fs
- .readFileSync(srcPath)
- .toString()
- .replace(
- "import android.support.v4.app.ActivityCompat;",
- "import androidx.core.app.ActivityCompat;"
- )
- );
- }
- if (
- context.opts.plugin &&
- context.opts.plugin.id === "cordova-plugin-code-push"
- ) {
- }
- };
|