UBports Training Update 5 aka 0101: Found a way to push data from the phone to the WebViewer!

Thank you for reading our latest update with progress of the UBports Training initiative.

From an old application to a new one

Last month we have been wrapping up the Stream app. Making a more advanced application was a nice learning experience for us. The desired functionality became an app! You can play music with it, and download playlists of songs and/or podcasts.

But for us the source code and a deeper insight in the QML landscape is the biggest return on investment.

You can find the app at the Open Store.

Track my run

Deciding on what kind of new application we would start to develop took some time. We noticed that in our previous app we didn’t use the phone’s capabilities to its full extent.

That’s why we chose to start with a Track My Run application, so we could read the GPS data and respond to it. Later on we might choose to develop apps with other sensors of the phone, like Bluetooth, the accelerometer, microphone, or camera.

Our intention is not to develop a fully functional application. Instead, we want to get the core functionality running bug-free, providing source code that others can build on.

For now, the repository can be found at https://github.com/codefounders-nl/track-my-run. Feel free to suggest functionality for us to build.

Connection between QML and web development

Last Thursday we reached quite a nice milestone. We were looking for a way to show pointers on a map. We mostly found public GPS maps mainly designed to be working in an HTML/CSS/JavaScript browser context.

With the help of the components WebEngineView, WebChannel and QtObject we were able to send the PositionSource geolocation data through to the index.html in the Component.onCompleted event. Have a look at the code in Main.qml.

In the HTML file we need to create a new QWebChannel, make a couple of imports, and myObj can now connect to propertyChanged events. Have a look at a totally clean cut HTML file showing this technique.

Module 4 of the training

In the fourth chapter of our app development training we focus on the QML programming context.

We start with a structured way of learning to work with variables, methods, properties and arguments in the QML file. Next, concepts such as signals, property bindings and methods are explained. And then we cover data types, variables and properties, JavaScript expressions in QML, and some JavaScript basics. The chapter concludes by applying this knowledge to remove items in the shopping list app.

Workshop at MCH2022 on Saturday 23rd July

We will attend MCH2022 on the Gear Stage on Saturday 23rd July. From 14:00 till 18:00 we will be giving a training in Ubuntu Touch mobile app development.

We hope to see you there!

Public app development meetings agenda

During holiday season we’ll organize one public app development meeting on:

  • Wednesday 13th July from 19:00 until 21:30 CEST

After holiday season we’ll come back every month, beginning in September on:

  • Wednesday 7th September from 19:00 until 21:30 CEST

On any of these public app development meetings you are more than welcome to enjoy an evening of programming Ubuntu Touch apps. We’ll be on the public Discord server in the Lobby room.

Kind regards,

UBports Training Team

Hi human! Your Biweekly UBports news is here!