Important notice: This post is about the legacy Nabto 4/Micro platform which has been superseded by the Nabto 5/Edge platform. Also see the general comparison of Nabto 4/Micro (uNabto) and Nabto 5/Edge. There is no native Cordova support in Nabto 5/Edge, but the platform comes with high level iOS and Android SDKs that are simple to use from Cordova and Ionic Capacitor.

 

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:

<br />
// Start Nabto and login as guest<br />
nabto.startup(function() {<br />
// Make a Nabto request to a device<br />var url = 'nabto://demo.nabto.net/wind_speed.json?';<br />nabto.fetchUrl(url, function(status, result) {</p>
<p>// Print out the response if it succeeded<br />if (!status &amp;&amp; result.response) {<br />console.log(result.response);<br />}</p>
<p>});</p>
<p>});<br />

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.

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.

Want to learn more about P2P IoT?

Please visit the:
P2P IoT Academy

Deep dive Into our documentation?

Please visit the:
Nabto Platform Overview

Try our demo for Video Surveillance?

Please visit the:
Nabto Edge
Video Cam Demo

Looking for other Great posts?

###