Back to Cordova

2022 11 05

slack-digest/2022-11-05.md

latest3.0 KB
Original Source

Cordova Slack Digest

Sat, 05 Nov 2022 08:21:40 GMT

User count: 4714

Join the conversation at slack.cordova.io

Channel #general (1 messages)


Fri, 04 Nov 2022 15:59:37 GMT

@chris.khong says

I have a pretty weird issue with plugin cordova-plugin-camera-preview on Samsung Galaxy A13. The taken picture looks like this, like a part of the image gets duplicated. Anyone has experienced the same or have an idea where should I look into? I have spent weeks on this issue but couldn’t fix it.

Channel #cordova-android (10 messages)


Fri, 04 Nov 2022 08:48:31 GMT

@info460 says

Thanks, I came to the same conclusion. P.S. Isn't it strange that after sending app to the background it's JS counter still works and can start playing MP3 when app is in the background? (It's kind of creepy when your phone start playing music by itself - run by one of many app in background)

Fri, 04 Nov 2022 13:38:34 GMT

@norman137 says

Android can allow apps to execute code in the background, including webviews, but they reserve the right to throttle CPU usage depending on resources available.

Fri, 04 Nov 2022 13:39:18 GMT

@norman137 says

iOS I don't think gives you that privilege. I think it's possible to do background tasks, but they can't be done in the webview I'm pretty sure.

Fri, 04 Nov 2022 17:15:58 GMT

@patrick662 says

using cordova-android 10 or 11, is there a way to still create an .apk for easy side loading? The .aab isn't as easy or I haven't found a simple guide for it. 🤓

Fri, 04 Nov 2022 17:20:57 GMT

@norman137 says

cordova build android -- --packageType=apk

Fri, 04 Nov 2022 17:21:08 GMT

@norman137 says

note the intermediate --

Fri, 04 Nov 2022 17:21:30 GMT

@norman137 says

If you're using windows cli, i think it needs to be in quotations, like cordova build android "--" --packageType=apk

Fri, 04 Nov 2022 17:23:27 GMT

@norman137 says

Alternatively you can also use build.json to set the packageType so you don't need to specify it in the CLI arguments. Examples can be found on https://cordova.apache.org/docs/en/11.x/guide/platforms/android/index.html#using-buildjson

Fri, 04 Nov 2022 19:57:23 GMT

@patrick662 says

I upgraded my CLI to 11, android to 11, plugin-camera to 6.0, plugin-file to 7.0 and after picking a photo and comes back with a broken image link. This use to work with older versions of the above. :)

I'm basically using the code from the example on the cordova web site. Really strange it cannot find it. Any suggestions? https://cordova.apache.org/docs/en/11.x/reference/cordova-plugin-camera/index.html

function

    var elem = document.getElementById('imageFile');
    elem.src = imgUri;
}```

Sat, 05 Nov 2022 00:10:29 GMT

@jcesarmobile says

Since camera plugin returns a file url and cordova uses a https url you can’t load it anymore