Comments (9)
That seems to be a problem with Cordova version 5. I'll need to see the API changes and correct that issue.
from cordova-plugin-camera-preview.
I changed code to
webView.getView().setBackgroundResource(0x00000000);
ViewGroup g = (ViewGroup)webView.getView().getParent();
but not helping much. Error got removed but camera is not going to background like before
from cordova-plugin-camera-preview.
I have the same issue: cordova 5.0.0, building app for android 4.4.2 (API 19)
All is ok except sending camera to back, I get these errors:
method getParent() is undefined for the type CordovaWebView
method setBackgroundColor(int) is undefined for the type CordovaWebView
I've tried to cast types but this doesn't work either.
I managed once to make it work by orverwriting files with the CordovaCameraPreviewApp files. But as soon I closed eclipse and re-open my project, these 2 errors came back.
from cordova-plugin-camera-preview.
Any news on this? also facing this problem
from cordova-plugin-camera-preview.
+1, any news regarding this issue?
from cordova-plugin-camera-preview.
@mbppower : what version number of cordova are you using ?
from cordova-plugin-camera-preview.
They've changed some things on the version 5. I was using Cordova 4.
from cordova-plugin-camera-preview.
Finally found a possible solution for this issue. Change the code
webView.setBackgroundColor(0x00000000);
ViewGroup g = (ViewGroup)webView.this.getParent();
g.setBackgroundColor(0x00000000);
g.bringToFront();
to
webView.getView().setBackgroundColor(0x00000000);
((ViewGroup)webView.getView()).bringToFront();
The class CordovaWebView in Cordova 5 is no longer inherited from WebView class in android. So the getParent() and setBackgroundColor() don't work. The down side of sending the camera preview box to the back of the webView is you can't drag the preview box.
from cordova-plugin-camera-preview.
Well done SeanChenU.
this works perfectly for me.
from cordova-plugin-camera-preview.
Related Issues (20)
- Get color of touched pixel from camera preview HOT 1
- takeSnapshot return blank image HOT 1
- camera is taking entire screen height and flip and close,capture buttons are not visible in native device,Please let me know if anyone has solution for this,z index is already given same as in the code HOT 2
- is platform windows supported ? HOT 3
- is platform browser supported ? HOT 1
- error building with xcode 13.4.1 HOT 6
- How to add barcode scanning ability using another plugin?
- takePicture error only on Android 9
- How to disallow Screenshot
- Android Studio forces me to set android:exported="true" in AndroidManifest.xml HOT 1
- Image is saved as Base64 regardless of storeToFile setting
- Illegal Access HOT 1
- This plugin doesn't seem to install in Android 13, API 33 HOT 2
- takePicture does not resolve promise on iPhone 15 Pro HOT 4
- AVCaptureStillImageOutput' is deprecated: first deprecated in iOS 10.0 - Use AVCapturePhotoOutput instead.
- iPhone 13 Pro Max autofocus issue on close objects HOT 3
- Documentation wrong for takeSnapshot and takePicture
- Can not perform this action after onSaveInstanceState
- photos Android clearer
- how do i ? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-camera-preview.