Nabto Cordova Plugin

nabto_and_cordova-fs8

We have now officially released our Nabto client Cordova plugin for everybody to use. This is a great step in improving the development speed and familiarity of creating a Nabto app.

https://www.npmjs.com/package/cordova-plugin-nabto

It is a shift in Nabto customer front-end development that we have long been wanting to make, since it enables developers to get started quicker and hopefully be more productive. Developers now have the ability to use standard tools, update mechanisms and seamlessly combine it with other Cordova plugins.

After adding the plugin to your cordova project by using “cordova plugin add cordova-plugin-nabto“, it is now incredibly easy to request data from your uNabto device:

// Start Nabto and login as guest
nabto.startup(function() {
// Make a Nabto request to a device
  var url = 'nabto://demo.nabto.net/wind_speed.json?';
  nabto.fetchUrl(url, function(status, result) {

    // Print out the response if it succeeded
    if (!status && result.response) {
      console.log(result.response);
    }

  });

});

For more details on usage visit https://github.com/nabto/cordova-plugin-nabto.

The old way of creating universal web-based Nabto apps using HTML Device Drivers is quietly being deprecated, while support for that solution is still kept. We will in the following days update the Nabto documentation and https://developer.nabto.com to reflect this change in strategy.

So far iOS and Android are the only platforms supported, but a plan for web-based desktop applications will be added later.

We also chose to open source the plugin at Github, including the library wrappers, for everybody to see and contribute to. These days we are moving a lot of our open source projects to Github repositories for better transparency towards our users.

A natural next step would be to create a couple of ionic apps for demonstrating full use cases using the new Cordova plugin.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s