Qt On Android
How To Develop C++ Applications on Android
Prof. Dr. Stefan Röttger, Stefan.Roettger@th-nuernberg.de
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.
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.
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:
Objectives Test:
Lecture 2
Qt Declarative (QML)
Learning Objectives:
Objectives Test:
Lecture 3
Mobile Sensors with QML
- QML GPS Example
- QML WebView Example
- QML Camera Example
- QML Accelerometer Example
- Android Manifest
- Google Play Store
Learning Objectives:
Objectives Test:
Lecture 4
Qt Native
Learning Objectives:
Objectives Test:
bool QAccelerometerFilter::filter(QAccelerometerReading *reading)
).
Lecture 5
Model-View Patterns with Qt
Lecture 6
JNI and the Android App Life Cycle
- JNI
- Using JNI to run own Java code
- Using JNI to show an Android notification
- The Android App Life Cycle
Free-Style
Free-Style Topic