import {Plugins} from '@capacitor/core';
const {UdpPlugin} = Plugins;
import {UdpPluginUtils} from 'capacitor-udp'; // if you want support for converting between ArrayBuffer and String
Crazy, i can not get it working. I just created a new capacitor project and used your code.
I installed the plugin and added android platform and run it it simulator:
vendor-es2015.js:44320 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'create' of undefined TypeError: Cannot read property 'create' of undefined at Tab1Page.<anonymous> (tab1-tab1-module-es2015.js:2852) at Generator.next (<anonymous>) at vendor-es2015.js:119189 at new ZoneAwarePromise (polyfills-es2015.js:3882) at Module.__awaiter (vendor-es2015.js:119185) at Tab1Page.process (tab1-tab1-module-es2015.js:2850) at Object.eval [as handleEvent] (Tab1Page.html:10) at handleEvent (vendor-es2015.js:73308) at callWithDebugContext (vendor-es2015.js:74926) at Object.debugHandleEvent [as handleEvent] (vendor-es2015.js:74562) at resolvePromise (polyfills-es2015.js:3803) at new ZoneAwarePromise (polyfills-es2015.js:3885) at Module.__awaiter (vendor-es2015.js:119185) at Tab1Page.process (tab1-tab1-module-es2015.js:2850) at Object.eval [as handleEvent] (Tab1Page.html:10) at handleEvent (vendor-es2015.js:73308) at callWithDebugContext (vendor-es2015.js:74926) at Object.debugHandleEvent [as handleEvent] (vendor-es2015.js:74562) at dispatchEvent (vendor-es2015.js:61028) at vendor-es2015.js:72240