1a android studio for developmentapm/cm/docs/asdev_print.pdflog.wtf()-log ‘what a terrible...

4
1 Android IDE [email protected] Mobile Computing Development with Android Studio Android Studio IDE and SDK Android IDE 2 Android Studio Android SDK https://developer.android.com/studio Android development Creation of emulators Android Virtual Device Manager (AVD) Android IDE 3 Android IDE 4 New Android project 1. 3. 2. 3.

Upload: others

Post on 05-Jun-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 1a Android Studio for Developmentapm/CM/docs/ASDev_print.pdfLog.wtf()-log ‘what a terrible failure’ These messages are shown on the Android Monitor Many API functions and even

1Android IDE

[email protected]

Mobile Computing

Developmentwith

Android Studio

Android Studio IDE and SDK

Android IDE 2

Android Studio

Android SDK

https://developer.android.com/studio

Android development Creation of emulatorsAndroid Virtual Device Manager (AVD)

Android IDE 3 Android IDE 4

New Android project

1.

3.

2.

3.

Page 2: 1a Android Studio for Developmentapm/CM/docs/ASDev_print.pdfLog.wtf()-log ‘what a terrible failure’ These messages are shown on the Android Monitor Many API functions and even

Characterizing a project

Android 5

Project Structure (some properties and dependencies)

Project properties

Projectorganization

You can delete these

Project skeleton

Android 6

Activities are classes that ultimately derive from Activity or some descendent

First method to be called

The screen is defined using a layout resource

Resources (activity layout)

Android 7

Layout editor

Android 8

Page 3: 1a Android Studio for Developmentapm/CM/docs/ASDev_print.pdfLog.wtf()-log ‘what a terrible failure’ These messages are shown on the Android Monitor Many API functions and even

Resources (values)

Android 9

You can define string constants, number constants, colors, styles, … in the values directory

The manifest

Android 10

Properties of application and other components

All componentsshould be listed

Intent filters allow the activation by the Launcher and other applications, using the corresponding intent

Execution

Android 11

Real device connected through USB

An emulator

Launch other emulator

Messages and emulator

Android 12

Execution messages

An emulator

Page 4: 1a Android Studio for Developmentapm/CM/docs/ASDev_print.pdfLog.wtf()-log ‘what a terrible failure’ These messages are shown on the Android Monitor Many API functions and even

Logging messagesUsing the Log class which has several static methodsLog.e() - log errorsLog.w() - log warningsLog.i() - log informationLog.d() - log debuggingLog.v() - log verboseLog.wtf() - log ‘what a terrible failure’

These messages are shown on the Android MonitorMany API functions and even the OS emit them In Android Studio: Use the bottom tab Android Monitor (Alt+6) In an independent view: adb logcat (SDK)Leave it running during the all session

Android 13

Debugging (1)breakpoints, single step, variable state, ...

Android 14

Debugging (2)