capacitor-udp icon indicating copy to clipboard operation
capacitor-udp copied to clipboard

Adding the plugin class in the MainActivity

Open BruceWayne-cpu opened this issue 4 years ago • 2 comments

Hi, what do you mean by "For android development, don't forget to add the plugin class in the MainActivity!"? it would be helpful if you include some examples. I'm getting an error about MainActivity. Thank you

BruceWayne-cpu avatar Jan 29 '21 20:01 BruceWayne-cpu

I haven't tested this quite yet but I found that when you open you capacitor app in android studio and to to /java/io.ionic.starter there is a MainActivity file where it said "add plugins here" I assume you just add the line add(UdpPlugin.class); to the init function. Let me know if that works for you.

theZaX avatar Feb 03 '21 07:02 theZaX

I can't find that file. I'm not using ionic actually, I'm using just capacitor and Vue.

BruceWayne-cpu avatar Feb 03 '21 13:02 BruceWayne-cpu