Cordova SDK plugin examples?


#1

Hi guys,

I have to develop a Cordova plugin using a native Android SDK and I’m struggling to figure out how to build it correctly especially in terms of sharing values or outputs from the plugin to my Ionic app. Can anyone thats developed a cordova plugin for Ionic 2 share their git repos so I can look at them and better understand the link between the Cordova plugin and the Ionic app? I know there are a lot of Cordova plugin repos but I haven’t found many good ones that are actually Ionic apps with native SDK Cordova plugins in use. Ionic Native plugins are different as they are documented very well and are easy to use.

Thanks!


#2

You can look at all the Ionic Native plugins, as they all provide a link to the underlying Cordova plugin. All of these are good enough to be used in Ionic Native, and are used in production apps.


#3

Yeah, I have been doing that. The problem is that the native plugins all use typescript to interact with the plugin and I don’t really understand how to get a value from A > B. For instance the UUID plugin simply transfers the UUID from the cordova plugin to the Ionic app, but I can’t get my success callback to send my DeviceID to my app. I think it’s something to do with the Ionic native plugins being linked to the module.