May 10, 2012 Lloyd Moore, President/Owner. Quick Start Video Building Mobility 1.2 SDK Emulator...

11
May 10, 2012 Lloyd Moore, President/Owner

Transcript of May 10, 2012 Lloyd Moore, President/Owner. Quick Start Video Building Mobility 1.2 SDK Emulator...

Page 1: May 10, 2012 Lloyd Moore, President/Owner. Quick Start Video Building Mobility 1.2 SDK Emulator Quirks Installing On A Device Summary Overview.

May 10, 2012

Lloyd Moore, President/Owner

Page 2: May 10, 2012 Lloyd Moore, President/Owner. Quick Start Video Building Mobility 1.2 SDK Emulator Quirks Installing On A Device Summary Overview.

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

Overview

Page 3: May 10, 2012 Lloyd Moore, President/Owner. Quick Start Video Building Mobility 1.2 SDK Emulator Quirks Installing On A Device Summary Overview.

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.

Quick Start Video

Page 4: May 10, 2012 Lloyd Moore, President/Owner. Quick Start Video Building Mobility 1.2 SDK Emulator Quirks Installing On A Device Summary Overview.

Pretty much the same as doing this for the desktop, however directories are different.

1.Download Qt Mobility 1.2 from http://download.qt.nokia.com/qt/add-ons/ and unzip to wherever you would like

2.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

3.Run the batch file: source my_batch_file.cmd

4.Run the configure command: ./configure -prefix /opt/necessitas/Android/Mobility/480/armeabi/ -modules "location“

5.Build the SDK: make

6.Install the SDK: sudo make install

7.Restart Qt Creator

Building Mobility 1.2 SDK

Page 5: May 10, 2012 Lloyd Moore, President/Owner. Quick Start Video Building Mobility 1.2 SDK Emulator Quirks Installing On A Device Summary Overview.

1.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.

2.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

Build Issues we hit building Mobility

Page 6: May 10, 2012 Lloyd Moore, President/Owner. Quick Start Video Building Mobility 1.2 SDK Emulator Quirks Installing On A Device Summary Overview.

The Android emulator generally appears to work, however it is a bit slow and this creates some issues.

1.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

2.For best results unlock the emulator before running your application

3.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.

Emulator Quirks

Page 7: May 10, 2012 Lloyd Moore, President/Owner. Quick Start Video Building Mobility 1.2 SDK Emulator Quirks Installing On A Device Summary Overview.

Need to turn on client side debugging

1.“Settings” -> “Applications” -> “Development”

2.Turn on “USB debugging”, “Stay Awake” and “Allow Mock Locations”

3.Other options may be available on your device, device shown below is a Motorola Droid.

Configuring Hardware Target

Page 8: May 10, 2012 Lloyd Moore, President/Owner. Quick Start Video Building Mobility 1.2 SDK Emulator Quirks Installing On A Device Summary Overview.

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

Installing Application On A Device

Page 9: May 10, 2012 Lloyd Moore, President/Owner. Quick Start Video Building Mobility 1.2 SDK Emulator Quirks Installing On A Device Summary Overview.

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.

Live Demos

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

Quick Start Video• http://labs.qt.nokia.com/2011/02/28/necessitas/

Necessitas Installer Downloads• http://sourceforge.net/p/necessitas/home/necessitas/

Necessitas Wiki Pages• http://sourceforge.net/p/necessitas/wiki/Home/

Android SDK Documentation• http://developer.android.com/index.html

My Contact Info: • [email protected]• http://www.CyberData-Robotics.com

Resources

Page 11: May 10, 2012 Lloyd Moore, President/Owner. Quick Start Video Building Mobility 1.2 SDK Emulator Quirks Installing On A Device Summary Overview.

Will be around a bit after the meeting for individual questions

Feel free to e-mail me

Questions????