capacitor

Ionic 5/Capacitor ERR_CLEARTEXT_NOT_PERMITTED in Android

青春壹個敷衍的年華 提交于 2021-01-15 19:43:06
问题 I'm using Capacitor for building the Ionic app. These are the following commands run in order to open the android app in Android Studio. npx cap add android ionic build npx cap copy npx cap open android In Android Studio, I ran the build and click on Run after which I see the error net::ERR_CLEARTEXT_NOT_PERMITTED in my device. I have seen various posts having the same error but those are with Cordova build. In my case, I'm not using Cordova for preparing the android app. Here are few

Using a Cordova plugin with Capacitor

丶灬走出姿态 提交于 2020-12-29 09:27:06
问题 I've been working through this example: https://capacitor.ionicframework.com/docs/basics/cordova I've run: npm install cordova-plugin-qrscanner npx cap sync and I can see the plugin installed in my node_modules. What I do not know how to do is call one of the functions on the cordova-plugin. I'm wondering if I need a packager like webpack? I'm also confused as to how this works if the cordova plugin contains native swift (or other) code. 回答1: Remember you can install the native wrapper too.

Ionic Capacitor cordova plugin unable to write image to library on Android

回眸只為那壹抹淺笑 提交于 2020-12-15 05:35:32
问题 I am trying to use cordova-plugin-document-scanner with Ionic Capacitor for Android, but after the image is captured and when image crop UI should be displayed, it just returns to the capture screen again. This is the issue on the github repo. This is what seems relevant in the logcat console: 2020-08-03 13:26:05.320 27707-27707/si.test.app D/ViewRootImpl@9f2e8cd[ScanActivity]: Relayout returned: old=(0,0,1080,2280) new=(0,0,1080,2280) req=(1080,2280)4 dur=8 res=0x1 s={false 0} ch=false 2020

Ionic Capacitor cordova plugin unable to write image to library on Android

时光毁灭记忆、已成空白 提交于 2020-12-15 05:33:25
问题 I am trying to use cordova-plugin-document-scanner with Ionic Capacitor for Android, but after the image is captured and when image crop UI should be displayed, it just returns to the capture screen again. This is the issue on the github repo. This is what seems relevant in the logcat console: 2020-08-03 13:26:05.320 27707-27707/si.test.app D/ViewRootImpl@9f2e8cd[ScanActivity]: Relayout returned: old=(0,0,1080,2280) new=(0,0,1080,2280) req=(1080,2280)4 dur=8 res=0x1 s={false 0} ch=false 2020

white screen ionic v6.11.8 capacitor

一个人想着一个人 提交于 2020-12-13 04:23:07
问题 As i'm trying to run the app via capacitor using the command below. ionic capacitor run android as it runs in the android studio 4.2 canary 11 successfully when i run my emulator on pixel or via mobile USB debug mode it gives me white screen after capacitor splash screen. If i use chrome chrome://inspect/#devices it shows my app running and as i see my console it also shows me console.log('dangggggggggggg'); which is inside the initializeApp() but i only see white screen. I have gone through

Ionic Capacitor Camera, generate full quality image and display it without generating Base64 and DataUri

浪子不回头ぞ 提交于 2020-12-04 08:21:58
问题 In my Ionic Project, I am using Capacitor for deployment in mobile platforms. For capturing an image from device, I am using Capacitor Camera which helps me to get the image in three formats. 1. Base64. 2. DataUrl. 3. FileUri. onCaptureImage() { if (!Capacitor.isPluginAvailable('Camera')) { this._sharedService.showToastMessage( 'Unable To Open Camera', 1000); return; } Plugins.Camera.getPhoto({ quality: 60, source: CameraSource.Prompt, correctOrientation: true, resultType: CameraResultType