This is my personal Apache Cordova plugin template containing examples for Android and iOS. It simply provides an echo(..) method that returns the passed value.
Once you're familiar with that process, you may install this plugin with the Cordova CLI:
cordova plugin add https://github.com/hirtenfelder/cordova-plugin-template.git
If the plugin was added to your Cordova (or Ionic) project, you may use it like that:
navigator.template.echo({string} echoValue, {function} successCallback);