2. Agenda
1. Mobile C++ Overview
2. Cross-Platform C++ Architecture with Djinni
3. Other C++ Tools for Android
4. Q&A
Image Credit: Toni Rodrigo
3. About Me
Background in web development, with iOS and Java experience 2007-2015
Began working with Cross-Platform C++ in July 2015
Mobile C++ Tutorials
mobilecpptutorials.com
Cross-Platform TV App: imperson8
imperson8.com
5. What is C++?
Designed by Bjarne Stroustrup at Bell labs in 1983
Extension of the C Language (++ as in numerical increment)
Used in all sorts of applications from Robots to Gaming
Known for high performance
6. C++ Advantages
It’s been around a long time... yay!
Plenty of troubleshooting info on the Internet
Many open-source libraries available (OpenCV, Boost, etc)
Good for apps that have heavy use of databases, APIs, etc.
Great for new apps, cross-platform Prototypes and MVPs
Unit testing across all platforms
Utilize Native UI (better performance)
Works on TVs!
7. C++ Disadvantages
It’s been around a long time… boo!
Out-of-date information on the Internet
Multiple ways of accomplishing the same thing
Bad for apps that are primarily UI
Difficult to migrate existing apps
Steep learning curve
Large number of languages and tools involved
Hard sell to clients/stakeholders
16. C++ Tools for Android
GYP (Generate Your Projects)
● Android no longer supported
● Have to write both GYP and
Make files
CMake
● Ideal for making reusable libraries
Experimental Gradle Plugin
● Build/include libraries and source
files all in Gradle
Android NDK
● Android’s libc (Bionic) has
several bugs
● Missing parts of the Standard
Libary (ex: std::thread and
std::mutex)
NDK OptionsBuilding Libraries
CrystaX NDK
● More C++ Support
● Bug fixes
17. Boost C++ Libraries
http://www.boost.org/
● Peer-reviewed by the C++ Community
● Boost libraries are often incorporated into the
C++ Standard Library
Can be difficult to integrate into Android/iOS, some helpful links:
Build Script for OS X/iOS: https://gist.github.com/faithfracture
Precompiled for tvOS: https://github.com/danoli3/ofxtvOSBoost
Android 3rd-Party NDK: https://www.crystax.net/
18. CrystaX NDK
https://www.crystax.net/
● Drop-in replacement for Google’s Android NDK
● Includes Boost Libraries
● Built-in C++11 and C++14 Support
● Includes missing elements from the Android NDK
(ex: std::thread and std::mutex)
● Includes most recent Clang and GCC Compilers
● Fixes to bugs in Android libc (Bionic)
19. Where to go from here?
Djinni and MX3 repos with examples:
https://github.com/dropbox/djinni
https://github.com/libmx3/mx3
Mobile C++ Tutorials:
http://mobilecpptutorials.com
Mobile C++ Slack Channel:
https://mobilecpp.slack.com/
CPP Con:
http://cppcon.org/