-
Notifications
You must be signed in to change notification settings - Fork 219
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
Is the Photoviewer only for Cordova projects? #225
Comments
The photoviewer works on my android device. Ok, I didnt know that Cordova is only for ios/android devices and not for the browser. Are there plans to make it available for Capacitor as well? |
You should try this Capacitor plugin https://github.com/capacitor-community/photoviewer |
Hi, your comment comes at the right time. Today I wanted to start the app on my smartphone after long time and I get an depricated gradle build error: FAILURE: Build failed with an exception.
|
Unfortunately I get an error when installating this photoviewer, not compatible with capacitor 4: npm install @capacitor-community/photoviewer |
Hmm, it's a @capacitor/core dependency conflict. Try to force the installation. |
I installed the packages with --force and tried it for web, but I dont get to see the images as desribes here https://github.com/capacitor-community/photoviewer/blob/main/docs/Ionic-Angular-Usage.md I only get the toast message: "echo Hello from PhotoViewer" called in the ngAfterViewInit-Method. But the urls to the images are valid! I dont understand this photoviewer, so I cant use it. I just wish a Photoviewer to fullscreen images by one tap, that can be part of chat messages. |
Hello, The package Regards, |
Hi,
when I click on an image, I get the error message:
Native: tried calling PhotoViewer.show, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator
I have an Ionic 6, Angular, Capacitor App and I am trying to implement this photoviewer plugin
I followed these steps
https://ionicframework.com/docs/native/photo-viewer
https://github.com/sarriaroman/photoviewer
npm i com-sarriaroman-photoviewer
npm install --save @ionic-native/photo-viewer
The the Ionic extension for Visual Studio Code said I had to migrate to awesome cordova plugins
`
[Ionic] Replace @ionic-native/photo-viewer...
[Ionic] Install...
Installed @awesome-cordova-plugins/core
[Ionic] @awesome-cordova-plugins/core Completed.
`
In the code with the showPhoto() method
`
import { PhotoViewer } from '@awesome-cordova-plugins/photo-viewer';
var photooptions = {
share: true, // default is false
closeButton: false, // default is true
copyToReference: true, // default is false
headers: '', // If this is not provided, an exception will be triggered
piccasoOptions: { } // If this is not provided, an exception will be triggered
};
showPhoto(image) {
console.log("image clicked", image);
PhotoViewer.show(image, 'Photo', photooptions);
}
`
The error message says: "Make sure to include cordova.js" How? Will this mess up my project?
The text was updated successfully, but these errors were encountered: