44
Getting started Running an application Managing apps Debugging apps Designing layouts with XML CS/SE Individual Practical Stephen Gilmore October 7, 2011 School of Informatics 1 / 44 CS/SE Individual Practical N

Beginning Android development

Embed Size (px)

Citation preview

Page 1: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

CS/SE Individual Practical

Stephen Gilmore

October 7, 2011

School of Informatics

1 / 44CS/SE Individual Practical

N

Page 2: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Getting started

Creating a new Android project

shot 2011-10-04 at 12.05.25.png

2 / 44CS/SE Individual Practical

N

Page 3: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Getting started

Naming your project

shot 2011-10-04 at 12.06.12.png

3 / 44CS/SE Individual Practical

N

Page 4: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Getting started

Specifying the platform

shot 2011-10-04 at 12.06.34.png

4 / 44CS/SE Individual Practical

N

Page 5: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Getting started

Looking at samples

shot 2011-10-04 at 12.06.45.png

5 / 44CS/SE Individual Practical

N

Page 6: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Getting started

A project is created

shot 2011-10-04 at 12.07.19.png

6 / 44CS/SE Individual Practical

N

Page 7: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Running an application

Configuring an Android application

shot 2011-10-05 at 09.30.38.png

7 / 44CS/SE Individual Practical

N

Page 8: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Running an application

Run configurations

shot 2011-10-05 at 09.30.47.png

8 / 44CS/SE Individual Practical

N

Page 9: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Running an application

Setting the DNS server

shot 2011-10-05 at 09.30.54.png

9 / 44CS/SE Individual Practical

N

Page 10: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Running an application

Running an Android application

shot 2011-10-04 at 12.07.33.png

10 / 44CS/SE Individual Practical

N

Page 11: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Running an application

Starting the activity on the emulator

shot 2011-10-04 at 12.07.42.png

11 / 44CS/SE Individual Practical

N

Page 12: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Running an application

The emulator running

shot 2011-10-04 at 12.08.15.png

12 / 44CS/SE Individual Practical

N

Page 13: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Running an application

Searching the dictionary

shot 2011-10-04 at 12.08.24.png

13 / 44CS/SE Individual Practical

N

Page 14: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Running an application

Autocompletion is used

shot 2011-10-04 at 12.08.37.png

14 / 44CS/SE Individual Practical

N

Page 15: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Running an application

The application in the launchpad

shot 2011-10-04 at 12.09.09.png

15 / 44CS/SE Individual Practical

N

Page 16: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Managing apps

Managing apps on the phone

shot 2011-10-04 at 12.09.24.png

16 / 44CS/SE Individual Practical

N

Page 17: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Managing apps

Selecting an app for deletion

shot 2011-10-04 at 12.09.50.png

17 / 44CS/SE Individual Practical

N

Page 18: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Managing apps

Forcing apps to stop

shot 2011-10-04 at 12.10.05.png

18 / 44CS/SE Individual Practical

N

Page 19: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Managing apps

Forcing apps to stop

shot 2011-10-04 at 12.10.12.png

19 / 44CS/SE Individual Practical

N

Page 20: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Managing apps

Uninstalling an app

shot 2011-10-04 at 12.10.16.png

20 / 44CS/SE Individual Practical

N

Page 21: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Managing apps

Uninstalling an app

shot 2011-10-04 at 12.10.23.png

21 / 44CS/SE Individual Practical

N

Page 22: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Managing apps

Uninstalling an app

shot 2011-10-04 at 12.10.27.png

22 / 44CS/SE Individual Practical

N

Page 23: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Debugging apps

Seeding a NullPointerException (NPE)

shot 2011-10-04 at 12.11.26.png

23 / 44CS/SE Individual Practical

N

Page 24: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Debugging apps

Try to run the application

shot 2011-10-04 at 12.11.34.png

24 / 44CS/SE Individual Practical

N

Page 25: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Debugging apps

User view of a NullPointerException

shot 2011-10-04 at 12.11.54.png

25 / 44CS/SE Individual Practical

N

Page 26: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Debugging apps

Change the Eclipse perspective

shot 2011-10-05 at 09.56.48.png

26 / 44CS/SE Individual Practical

N

Page 27: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Debugging apps

Dalvik Debug and Monitor Service

shot 2011-10-05 at 09.56.57.png

27 / 44CS/SE Individual Practical

N

Page 28: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Debugging apps

DDMS perspective with LogCat

shot 2011-10-05 at 09.58.21.png

28 / 44CS/SE Individual Practical

N

Page 29: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Debugging apps

Developer view of a NPE

shot 2011-10-04 at 12.12.18.png

29 / 44CS/SE Individual Practical

N

Page 30: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Debugging apps

Tracking the error back to the code

shot 2011-10-04 at 12.13.17.png

30 / 44CS/SE Individual Practical

N

Page 31: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Debugging apps

Error found, warning visible

shot 2011-10-04 at 12.13.24.png

31 / 44CS/SE Individual Practical

N

Page 32: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Debugging apps

Bug removed, Java Problem disappears

shot 2011-10-04 at 12.13.45.png

32 / 44CS/SE Individual Practical

N

Page 33: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Designing layouts with XML

Graphical view of XML in editor

shot 2011-10-04 at 12.14.06.png

33 / 44CS/SE Individual Practical

N

Page 34: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Designing layouts with XML

Source code view of XML in editor

shot 2011-10-04 at 12.14.10.png

34 / 44CS/SE Individual Practical

N

Page 35: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Designing layouts with XML

Outline view of XML in editor

shot 2011-10-04 at 12.14.10.png

35 / 44CS/SE Individual Practical

N

Page 36: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Designing layouts with XML

The editor (and themes)

shot 2011-10-04 at 12.14.32.png

36 / 44CS/SE Individual Practical

N

Page 37: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Designing layouts with XML

Changing the theme (Holo light)

shot 2011-10-04 at 12.14.45.png

37 / 44CS/SE Individual Practical

N

Page 38: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Designing layouts with XML

Changing the theme (Theme Light)

shot 2011-10-04 at 12.15.17.png

38 / 44CS/SE Individual Practical

N

Page 39: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Designing layouts with XML

Adding widgets with drag and drop

shot 2011-10-04 at 12.16.14.png

39 / 44CS/SE Individual Practical

N

Page 40: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Designing layouts with XML

The graphical layout is updated

shot 2011-10-04 at 12.16.19.png

40 / 44CS/SE Individual Practical

N

Page 41: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Designing layouts with XML

XML source automatically updated too

shot 2011-10-04 at 12.16.41.png

41 / 44CS/SE Individual Practical

N

Page 42: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Designing layouts with XML

Undo changes in the editor

shot 2011-10-04 at 12.16.53.png

42 / 44CS/SE Individual Practical

N

Page 43: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Designing layouts with XML

Errors in XML code

shot 2011-10-04 at 15.59.11.png 43 / 44CS/SE Individual Practical

N

Page 44: Beginning Android development

Getting started Running an application Managing apps Debugging apps Designing layouts with XML

Designing layouts with XML

Errors in XML can be subtle

shot 2011-10-04 at 15.59.44.png 44 / 44CS/SE Individual Practical

N