-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Camera plugin is not implement on Android (Capacitor Camera) when pairing with Capacitor-Community/Media #82
Comments
As additional information: I just realized that all capacitor plugins (Push Notifications, Google Maps, Camera, Haptics) throw "not implemented on android" error. If i uninstall and remove Media plugin, everything works. |
Sorry, but I'm unable to reproduce this. Both the example app and my company's app uses the Media plugin with many other plugins, and has never had an issue. It's likely that this has something to do with your specific setup. Try the troubleshooting steps here (there's a section specifically for "not implemented" errors): https://capacitorjs.com/docs/android/troubleshooting |
I guess I have same or similar issue. Sample code:
Console error:
Plugin version: 5.4.1 Same code works fine on iOS |
@AEiosApp I believe this is not an error with the Media plugin, but instead a problem with your specific app. Try the troubleshooting steps here (there's a section specifically for this "not implemented" error): https://capacitorjs.com/docs/android/troubleshooting I can't help you debug your app specifically, but there are resources online (e.g. the Ionic Discord) where you can ask the community for help. If you have any problems with the plugin itself, please open a new issue! |
@nkalupahana sorry, my fault, missed to define plugin in capacitor.congig.ts / includePlugins Everything works like a charm! |
Describe the bug
On Ionic / Angular -> I am trying to use the Media plugin as an alternative to choosing various photos and uploading them to a backend (using Capacitor Camera pickImages() function makes it complicated without a clear path to convert that image to a dataURL o Base64 string). So I am currently trying to implement Capacitor Camera for taking photos and Capacitor-Community/media for selecting photos.
the bug is that now that the Media plugin is installed, Capacitor Camera is throwing an error that "Camera is not implemented on Android)
Error from logcat here:
File: https://localhost/main.db46d93f1695260e.js - Line 1 - Msg: ERROR Error: "Camera" plugin is not implemented on android
To Reproduce
Steps to reproduce the behavior:
`
import { Camera, CameraDirection, CameraPermissionState, CameraResultType, CameraSource } from '@capacitor/camera';
import { Media } from '@capacitor-community/media';
async selectPhotos() {
const _self = this;
const result = await Media.getMedias({
types: "photos",
});
return result;
}`
Expected behavior
To be able to use Capacitor Camera and Capacitor-Community/media together.
Screenshots
If applicable, add screenshots to help explain your problem.
Smartphone (please complete the following information):
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: