Lectures

Qt On Android

How To Develop C++ Applications on Android

Prof. Dr. Stefan Röttger, Stefan.Roettger@th-nuernberg.de



Include this page



Introduction

Android has become the main mobile platform besides the competitors Apple iOS and Windows Mobile. The development of Java programs with the Android SDK (aka Android Studio) is well documented and supported by the Google developer program, so that even beginners manage to write their first programs easily. In contrast to that, the development of native C and C++ applications is a tedious task with many pitfalls. In this lecture we will learn how to avoid those pitfalls and how to leverage the full power of the Android device by developing native C++ apps with Google’s native development kit - the NDK.


Lecture0

Lecture 0

In the following we will use Qt Creator to write C++ native Android programs. Our development platform will be Linux. As a prerequisite, we assume that the reader is experienced with C++ and the Unix GCC tool chain and has basic knowledge of cross-compiling and mobile platform deployment. Practical experience with Qt will be helpful.


Lecture1

Lecture 1

Getting started with Unix and Qt Creator

Exercise: Get started with Unix and Qt Creator by deploying one of the mobile Qt examples on your own Android device.

Learning Objectives:

Recap Unix and the C++ tool chain
Installation of Qt Creator
Overview of the Android SDK and NDK

Objectives Test:

What applications of the NDK tool chain are involved with deploying a native app on Android?


Lecture2

Lecture 2

Qt Declarative (QML)

Learning Objectives:

Recap JavaScript
Learn QML basics

Objectives Test:

How can we place two QML apps running concurrently?
How can we add a radio button or a drop down menu in QML?


Lecture3

Lecture 3

Mobile Sensors with QML

Learning Objectives:

Write a first QML app

Objectives Test:

Modify the QML camera example app by adding a “Focus” and “Capture” button!


Lecture4

Lecture 4

Qt Native

Also see Lectures 5 and 6 of the Qt lecture.

Learning Objectives:

Write a first native Qt app

Objectives Test:

Modify the compass example by implementing an accelerometer. Use the accelerometer readings to implement a water level (Wasserwaage bzw. Winkelmesser) (by overriding bool QAccelerometerFilter::filter(QAccelerometerReading *reading)).


Lecture5

Lecture 5

Model-View Patterns with Qt


Lecture6

Lecture 6

JNI and the Android App Life Cycle


Lecture7

Free-Style

Free-Style Topic


Course Certificate

Options: