-
I am needing some very application specific briding between the webstack and the native platform. Therefore (like I did before in ReactNative) I would like to create a small bridge with custom native plugins but within the capacitor host application. Is that possible? I am not sure how to declare the TS types and instances to access them properly in the TS world Right now i am having this on android @CapacitorPlugin
class AnalyticsPlugin : Plugin() { } and registering it via registerPlugin(AnalyticsPlugin.class); I think so far everything is fine, but now accessing this from inside the webview does not work declare const Analytics: AnalyticsPlugin;
export interface AnalyticsPlugin {
stopGameStartingTrace(): Promise<void>
}
Analytics.executeMyCustomCode Any help is highly appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Alright, I think I have found the solution. This helped a lot https://capacitorjs.com/docs/android/custom-code#javascript |
Beta Was this translation helpful? Give feedback.
Alright, I think I have found the solution. This helped a lot https://capacitorjs.com/docs/android/custom-code#javascript