-
Hello Capacitor teams, We use external app url in Problem: how can we use capacitor plugins in the external Next.js app ? (for example Would be great to install them directly from Thanks a lot |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Inspecting the https://developer.mozilla.org/en-US/docs/Web/API/NavigatorPlugins/plugins Maybe the best way to expose these plugins / APIs ? |
Beta Was this translation helpful? Give feedback.
-
It works simply adding the plugin in both environments (capacitor and javascript app). The plugins of capacitor are enough smart to check the environment of an app, and use the right APIS the browser gives. For example in browser, the Camera plugin can open an UI popup to take a picture, otherwise when the environment is Capacitor, it uses native Camera apis. So really really simple. |
Beta Was this translation helpful? Give feedback.
It works simply adding the plugin in both environments (capacitor and javascript app).
The plugins of capacitor are enough smart to check the environment of an app, and use the right APIS the browser gives. For example in browser, the Camera plugin can open an UI popup to take a picture, otherwise when the environment is Capacitor, it uses native Camera apis. So really really simple.