Android & iOS – on the edge of Qt and Java/Objective-C
Maciej Węglarczyk
Android & iOS on the edge of Qt and Java/Objective-C Maciej - - PowerPoint PPT Presentation
Android & iOS on the edge of Qt and Java/Objective-C Maciej Wglarczyk Android & iOS on the edge of Qt and Java/Objective-C About me Cracow, Poland Graduated from AGH-UST with MSc in CS 6+ Qt years Game industry
Android & iOS – on the edge of Qt and Java/Objective-C
Maciej Węglarczyk
Android & iOS – on the edge of Qt and Java/Objective-C About me
The purpose of this talk
Android & iOS – on the edge of Qt and Java/Objective-C
Agenda
Android & iOS – on the edge of Qt and Java/Objective-C
Beyond Qt “It's a dangerous business, Frodo, going out of your door”
Bilbo Baggins
Android & iOS – on the edge of Qt and Java/Objective-C
EXTENDING? WHY?
Android & iOS – on the edge of Qt and Java/Objective-C
Importance of rich features
Android & iOS – on the edge of Qt and Java/Objective-C
Native integration - it's actually nothing new
Android & iOS – on the edge of Qt and Java/Objective-C
Where to start?
Android & iOS – on the edge of Qt and Java/Objective-C
What's not possible with Qt (at least for now)
Android & iOS – on the edge of Qt and Java/Objective-C
Required tools Android & iOS – on the edge of Qt and Java/Objective-C
Android
(emulator is still rather slow and sometimes unreliable)
iOS
(devices are better, though)
Useful tips
Android & iOS – on the edge of Qt and Java/Objective-C
Basic Android / iOS projects
Android & iOS – on the edge of Qt and Java/Objective-C
ADDING NATIVE CODE
Android & iOS – on the edge of Qt and Java/Objective-C
Adding native code – Android
QT += androidextras QAndroidActivityResultReceiver QAndroidJniEnvironment QAndroidJniObject
Android & iOS – on the edge of Qt and Java/Objective-C
Adding native code – Android
<Example>
https://github.com/FenixVoltres/QtAndroidCpp2Java https://github.com/FenixVoltres/QtAndroidJava2Cpp
Android & iOS – on the edge of Qt and Java/Objective-C
Adding native code – iOS
It's very simple:
Android & iOS – on the edge of Qt and Java/Objective-C
Adding native code – iOS
talk on Qt for iOS from last year Qt DD 13
<Example>
https://github.com/richardmg/qtdd13_qmlapp
Android & iOS – on the edge of Qt and Java/Objective-C
How about Swift?
Swift -> Objective-C++ -> Qt
Android & iOS – on the edge of Qt and Java/Objective-C
ADDING NATIVE LIBRARIES
Android & iOS – on the edge of Qt and Java/Objective-C
Adding native libraries – Android
<Example>
https://github.com/FenixVoltres/QtAndroidNativeLib
Android & iOS – on the edge of Qt and Java/Objective-C
Adding native libraries – iOS
Even simpler:
LIBS += -F/path/to/frameworks/folder LIBS += -framework StoreKit Android & iOS – on the edge of Qt and Java/Objective-C
MODYFYING ENTRY POINT
Android & iOS – on the edge of Qt and Java/Objective-C
Why one would modify an entry point?
Android & iOS – on the edge of Qt and Java/Objective-C
Deployment process – Android
are copied to android build folder
Android & iOS – on the edge of Qt and Java/Objective-C
Adding .java source files
so it points to folder with Android internal folders structure (src, res, assets, libs) or let QtCreator does it for you
in src folder
the final .apk file
Android & iOS – on the edge of Qt and Java/Objective-C
Modifying app’s entry point – Android
<Example>
https://github.com/FenixVoltres/QtAndroidSplash
Android & iOS – on the edge of Qt and Java/Objective-C
Deployment process – iOS
Android & iOS – on the edge of Qt and Java/Objective-C
Modifying app’s entry point – iOS
Android & iOS – on the edge of Qt and Java/Objective-C
WRAP UP
Android & iOS – on the edge of Qt and Java/Objective-C
Mixing Qt with native code
Good luck!
Android & iOS – on the edge of Qt and Java/Objective-C
THANK YOU!
Android & iOS – on the edge of Qt and Java/Objective-C
Questions & Answers maybe
Android & iOS – on the edge of Qt and Java/Objective-C
Maciej Węglarczyk Maciej.Weglarczyk@gmail.com