Yocto-Graph improvements

Yocto-Graph improvements

This week, we are going to talk about our Yocto-Graph Android application. At the beginning, this application was designed as a usage example for the data logger, but some customers find it convenient and have asked use whether we could add network support to it, in order to use Yoctopuce modules connected to a YoctoHub. We therefore decided to add network support to the Yocto-Graph.


As 95% of the modifications are interface management and parameter saving issues, we are not going to detail the code in this post. The code of the application is however included in our Android library available on our web site or on GitHub.

Broadly speaking, we can summarize the modifications as creating a new configuration panel to manage the list of YoctoHub URLs that the application is going to use. The existing code is not modified, with the exception of the call to YAPI.RegisterHub which is now called for each YoctoHub.

YAPI.RegisterHub('usb');
for (String url : _registerdHubs) {
    Log.d("YHUB", "register " + url);
    YAPI.RegisterHub(url);
}


Let's have a look


The welcome screen is almost the same. The menu has a new "Configuration" item which allows you to add or modify the list of YoctoHubs or VirtualHubs that you want to use.

The welcome screen
The welcome screen



The configuration panel


The configuration panel enables you to enable or disable the use of the USB port. By default this option is enabled.

It also displays the list of YoctoHubs which the application uses. The pencil icon enables you to modify an entry, while the x button enables you to delete a YoctoHub. Finally, the + button enables you to add a YoctoHub or a VirtualHub.



The configuration panel
The configuration panel




The YoctoHub configuration panel


When adding or editing a YoctoHub, the following panel is displayed:

The YoctoHub configuration panel
The YoctoHub configuration panel



You can specify a hostname (or IP address), the port, as well as authentication parameters. The Test connection button allows you to check that the parameters are correct and the phone can connect to the YoctoHub. The save button saves the modifications and closes the panel. If you perform a back, the current modifications are ignored.

Here you are


You can now use Yocto-Graph with remote Yoctopuce sensors.

You can now use the Yocto-Graph with remote Yoctopuce sensors
You can now use the Yocto-Graph with remote Yoctopuce sensors



The application is available on Play Store, and from our web site by downloading the Android library. On top of the application sources, the sub-directory Binaries of the library contains a Yocto-Graph-release.apk file which enables you to install the application on any Android device.

Add a comment No comment yet Back to blog












Yoctopuce, get your stuff connected.