1 / 11

Qt Development on Android

Qt Development on Android. May 10, 2012 Lloyd Moore, President/Owner. Overview. Quick Start Video Building Mobility 1.2 SDK Emulator Quirks Installing On A Device Summary. Quick Start Video .

moesha
Download Presentation

Qt Development on Android

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Qt Development on Android May 10, 2012 Lloyd Moore, President/Owner

  2. Overview • Quick Start Video • Building Mobility 1.2 SDK • Emulator Quirks • Installing On A Device • Summary

  3. Quick Start Video Excellent video on the web showing how to set everything up so we’ll just start with that: http://labs.qt.nokia.com/2011/02/28/necessitas/ Necessitas home: http://sourceforge.net/p/necessitas/home/necessitas/ Notes: Project is actively being worked on, and is currently at Alpha 3, update 4 revision level. Last update was Feb 18, 2012. This is a technology you will want to watch, but NOT start any major projects with at this time. The rest of this presentation is based on Ubuntu 10.10 and some assumptions are made about directories and such, which may vary based on your individual configuration.

  4. Building Mobility 1.2 SDK Pretty much the same as doing this for the desktop, however directories are different. • Download Qt Mobility 1.2 from http://download.qt.nokia.com/qt/add-ons/ and unzip to wherever you would like • Create the following batch file #!/bin/bashQTDIR=/opt/necessitas/Android/Qt/480/armeabiPATH=$PATH:$QTDIR/binMANPATH=$QTDIR/doc/man:$MANPATHLD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATHexport QTDIR PATH MANPATH LD_LIBRARY_PATH • Run the batch file: source my_batch_file.cmd • Run the configure command: ./configure -prefix /opt/necessitas/Android/Mobility/480/armeabi/ -modules "location“ • Build the SDK: make • Install the SDK: sudo make install • Restart Qt Creator

  5. Build Issues we hit building Mobility • Necessitas installs to “/opt/necessitas” so you will need to make sure all directory references point here. The scripts and commands above have already had this change added in. • Related to #1 the tool chain ends up in a different place than expected. This can easily be fixed with a “soft link” or “symbolic link” ln –s ~/NecessitasQtSDK /opt/necessitas

  6. Emulator Quirks The Android emulator generally appears to work, however it is a bit slow and this creates some issues. • When starting a test run from inside Qt Creator for the first time, Qt Creator does not wait long enough for the emulator to start in all cases. Solutions: Start the emulator manually before attempting the test run Just allow the first run to timeout, wait for the emulator to boot, and do it again This seems to be better in more recent releases • For best results unlock the emulator before running your application • Qt libraries will need to be downloaded the first time, this takes a while and Qt Creator does not wait for this. Solutions: Again just wait for this to happen the first time and then start the test run again. The libs appear to be saved even if the emulator is turned off.

  7. Configuring Hardware Target Need to turn on client side debugging • “Settings” -> “Applications” -> “Development” • Turn on “USB debugging”, “Stay Awake” and “Allow Mock Locations” • Other options may be available on your device, device shown below is a Motorola Droid.

  8. Installing Application On A Device Device needs to have a current version of Android on it, not sure specifically what the cut off is at this point but Android 2.2 does NOT work. Have not found the mechanism to do this yet inside QtCreator, pieces appear to be there but not complete yet. Standard SDK tool from Android SDK is called Android Debug Bridge • adb devices - Will allow you to see attached devices and give the serial number of each -Also shows emulator(s) -Prefix with “sudo” if running under Linux to get needed permissions • adb –s <device id> install <my_package.apk> - Installs your program/package to the actual device -Will also install a default icon for the application Full documentation for adb available at: http://developer.android.com/guide/developing/tools/adb.html

  9. Live Demos • If interested and time we can fire up the live environment and do some live builds and runs of: • Mobility Location Services • Hello World application • LocoMaps application • Source code for the Hello World application will also be made available.

  10. Resources • Quick Start Video • http://labs.qt.nokia.com/2011/02/28/necessitas/ • Necessitas Installer Downloads • http://sourceforge.net/p/necessitas/home/necessitas/ • NecessitasWiki Pages • http://sourceforge.net/p/necessitas/wiki/Home/ • Android SDK Documentation • http://developer.android.com/index.html • My Contact Info: • Lloyd@CyberData-Robotics.com • http://www.CyberData-Robotics.com

  11. Questions???? • Will be around a bit after the meeting for individual questions • Feel free to e-mail me

More Related