Praktikum Entwicklung von Mediensystemen (Android) Sommersemester - - PowerPoint PPT Presentation

praktikum entwicklung von mediensystemen android
SMART_READER_LITE
LIVE PREVIEW

Praktikum Entwicklung von Mediensystemen (Android) Sommersemester - - PowerPoint PPT Presentation

Praktikum Entwicklung von Mediensystemen (Android) Sommersemester 2014 Simon Eumes, Dr. Alexander De Luca Today Recap Android 102 Hands-On Assignment 02 April 24, 2014 PEM (Android) - SS 2014


slide-1
SLIDE 1

Praktikum Entwicklung von Mediensystemen (Android)

Sommersemester 2014

Simon Eumes, Dr. Alexander De Luca

slide-2
SLIDE 2

Today

  • Recap
  • Android 102
  • Hands-On
  • Assignment 02

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 2 ¡

slide-3
SLIDE 3

RECAP

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 3 ¡

slide-4
SLIDE 4

ANDROID 102

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 4 ¡

slide-5
SLIDE 5

Fragments

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 5 ¡

Android 102

  • Similar lifecycle compared to an Activity
  • Used to reduce overhead and adapt to different

layouts more quickly

  • Encapsulate responsibility
  • Make sure to use interfaces for communication

between Fragments/Activities

slide-6
SLIDE 6

Fragments

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 6 ¡

Android 102

http://developer.android.com/guide/components/fragments.html

slide-7
SLIDE 7

Services

  • Perform long running tasks
  • Have no UI and initially do not run in own thread
  • Multiple clients can bind to them and exchange

data

  • Can be use to share information between multiple

applications (IPC)

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 7 ¡

Android 102

slide-8
SLIDE 8

Services

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 8 ¡

Android 102

http://developer.android.com/guide/components/services.html

slide-9
SLIDE 9

Toasts

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 9 ¡

Android 102

  • Toast.makeText(context, text, duration).show();

http://developer.android.com/guide/topics/ui/notifiers/toasts.html

slide-10
SLIDE 10

Notifications

  • Global notifications
  • Link to Activity and

display first information

  • Can be modified/

dismissed after posting and made sticky

  • Keep the design

guidelines in mind

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 10 ¡

Android 102

http://developer.android.com/guide/topics/ui/notifiers/notifications.html

slide-11
SLIDE 11

Animations & Graphics

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 11 ¡

Android 102

  • Property animation

– Animate properties of any object

  • View animation

– Stack multiple animations together and animate a View

  • Drawable animation

– Create an “animated gif” out of stacked images

  • Canvas drawing

– Manual control, explicit draw commands

  • OpenGL

http://developer.android.com/guide/topics/graphics/index.html

slide-12
SLIDE 12

Sensors

  • Around 15 different sensors currently supported
  • Differentiation between three main classes

– Motion, Position, Environment

  • Unified interface for access

– getSystemService(SENSOR_SERVICE); – getDefaultSensor(Sensor.TYPE_ACCELEROMETER);

  • Register listener for updates (including frequency)

– SensorEventListener, SensorEvent – Make sure to unregister (e.g. on onPause)

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 12 ¡

Android 102

slide-13
SLIDE 13

Broadcasts & BroadcastReceivers

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 13 ¡

Android 102

  • Sends messages within your application or

system wide

– Intent.ACTION_DIAL – Intent.ACTION_SENDTO

  • React to events triggered by the system

– Intent.ACTION_BOOT_COMPLETED – Intent.ACTION_POWER_CONNECTED

  • Build you own, either exposing data or reacting to

events

  • Use Intent to share information
slide-14
SLIDE 14

HANDS-ON

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 14 ¡

slide-15
SLIDE 15

ADDITIONAL INFORMATION

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 15 ¡

slide-16
SLIDE 16

Assignment 02

  • Individual assignment
  • Build up on your previous work
  • Fragments, Notifications and screen layouts
  • Due in 2 weeks (08.05.)
  • Submission via Uniworx

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 16 ¡

slide-17
SLIDE 17

Next Lecture

  • Next lecture in 2 weeks (08.05.), 14.00h
  • Semester project introduction
  • Teaming up

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 17 ¡

slide-18
SLIDE 18

Questions

  • Open Q&A

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 18 ¡

slide-19
SLIDE 19

Resources

  • Android Developers

– http://developer.android.com/design – http://developer.android.com/training – http://developer.android.com/guide

  • Google IO Session Recordings

– https://developers.google.com/events/io/2012 – https://developers.google.com/events/io/2013

  • Google IO Schedule App

– https://code.google.com/p/iosched

April ¡24, ¡2014 ¡ PEM ¡(Android) ¡-­‑ ¡SS ¡2014 ¡ ¡ 19 ¡