Blogs

Uniface mobile - Custom Cordova plugin support

By Uniface Test posted 10-19-2016 16:31

  

(Original creator: miketaylor)

Some would have noticed that this week has seen the release of two new Uniface patches - G302 for 9.7.02 and F102 for 10.2.01. Normally I wouldn't post about a patch, however, this time, there is something new that has been included that I would like to share with you. It is now possible to include custom plugins into your mobile app. In 9.7.02 we introduced the ability to access the Buildozer online build services to compile iOS and Android apps. Included in this integration was the facility to select, from a predefined list, a number of plugins to be included and made available, in JavaScript, to your DSP application. The latest patches have increased this support to enable you to also include plugins from third parties or ones you have created yourself. Looking in the development environment with the application shell type set to Mobile you will see it is possible to set the mobile app's properties. With these patches, a new field has been added to the properties screen that allows you to specify one or more public (git) repository where the plugins reside. Now, with the plugins selected in application startup shell, you can submit your app to be built and, as part of server processing, the plugin will be downloaded automatically and included within your project.


Mobile app definitions screen

As an example, we have been asked for the ability to interface with Bluetooth to print a label on a wireless connected printer. A quick search on Google (for Cordova Bluetooth plugin) offered me several options that seem to fit the bill one of which, picked at random, is

https://github.com/evothings/cordova-ble. If I was to include their repository (https://github.com/evothings/cordova-ble.git) in my Uniface definitions, before building my app, I would be given access to the device's Bluetooth capabilities using the documented API. The Uniface G302 and F102 patches also include the latest documentation which has been updated to include this topic.

0 comments
0 views