1. Content

  • Big picture

  • Concepts

  • Android Studio

  • Brainstorm on Android MetaModel

  • Thoughts for your process

  1. Pour ne pas perdre du temps, commencez à lancer l’installation d’Android Studio si ce n’est déjà fait sur vos machines en téléchargeant au choix depuis :

  2. La dernière version d’Android Studio au moment de rédiger ce support est la 4.0.2 mais ce support de cours utilise les éléments (menus, captures d’écran, etc.) de la version 4.0.2.

2. Big Picture

A unique aspect of the Android system design is that any app can start another app’s component.
— Android Developers Fundamentals

2.1. Build

Build
Figure 1. Build of an Android app

2.2. Running

Running
Figure 2. Running of an Android app

2.3. Overall Organization

Organization
Figure 3. Basic organization of an Android app

2.4. Interactions

Interactions
Figure 4. Basic interactions between users and apps

2.5. Set of libraries, resources, etc.

Overview
Figure 5. Complex organization of concepts

2.6. Messages

Try to avoid "Hello JMB!":

Bad: using string "hard coded"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    ...
    <TextView android:text="Hello JMB!" android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
</RelativeLayout>
AVD launching3
Figure 6. Rendu du Layout

Use "@string/message" instead:

Bad: using string "hard coded"
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    ...
    <TextView android:text="@string/message" android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
</RelativeLayout>
String.xml
<resources>
    <string name="app_name">My First App</string>
    <string name="action_settings">Settings</string>
    <string name="message">Hello JMB!</string>
</resources>
AVD launching3
Figure 7. Rendu du Layout identique

2.7. content_main.xml

content_main.xml is a kind of Layout.

content_main.xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    ...
    <TextView android:text="@string/message" android:layout_width="wrap_content"
        android:layout_height="wrap_content" />
</RelativeLayout>

2.8. Views

A Layout contains components (buttons, etc.) ⇒ Views

View structure
Figure 8. content_main.xml

2.9. Intent

Activities communicate through Intent.

In the same app:

Intent
Figure 9. Intent in an app

Or between apps:

Intent b/w apps
Figure 10. Intent between apps

3. Android Studio in a minute

3.1. Install

welcome

3.2. Create a new Android Studio project

start

3.3. Select a Project Template

new1

3.4. Configure the project

new2

3.5. First app created!

AVD launching2

3.6. Detail of an activity

activity xml

3.7. Android Virtual Device Manager

AVD config

3.8. AVD Selection and Configuration

AVD config2

3.9. AVD Launching

AVD launching2
AVD launching3

3.10. Navigation Editor

AndroidStudioNavigationEditor

4. Android metamodel

Android Concepts
Figure 11. Concepts Android

Check the Android fundamentals, enrich the list of important concepts and organize them.

5. Basic Components

Basic Components
Figure 12. Basic components

6. Excerpt of the MetaModel

androidmm
Figure 13. Android Metamodel (excerpt, taken from [Velduis2013])

7. Android Activities Lifecycle

Android Activities Lifecycle
Figure 14. Android Activities Lifecycle

8. Organizing you app

  • List of Activities

    • Top Activities

    • Category activities

    • Detail/edit

  • Navigation through the activities

  • App structure

  • Process:

    • define class, resources (images, …​), strings

    • top-level / layout

    • loop for each activity

activities
Figure 15. Organizing activities

9. Subtilities not covered

  • Manifest.xml

  • Fragments

  • Screen-specific resources

  • Librairies, themes, styles, etc.

  • Database connection

  • Services

  • Material specifics, ART

  • Distribution and commercial aspects

Full Android MetaModel

Activity

activity

Behavior

behavior

Entity

entity

Fragment

fragment

Layout

layout

Menu

menu

Resources

resources

View

view

ViewBehavior

viewbehavior

References and useful links

References

  • [gram86] Ana Gram. Raisonner pour programmer. Dunod, 1986.

  • [HighsmithFowler2001] Jim Highsmith and Martin Fowler. The agile manifesto. Software Development Magazine, 9(8) :29–30, 2001.

  • [1030005] Kieran Conboy and Brian Fitzgerald. Toward a conceptual framework of agile methods : a study of agility in different disciplines. In WISER ’04 : Proceedings of the 2004 ACM workshop on Interdisciplinary software engineering research, pages 37–44, New York, NY, USA, 2004. ACM.

  • [Roques2007a] Les Cahiers du Programmeur, UML2, Pascal Roques 3ème Edition, Eyrolles, 2007.

  • [Roques2007b] UML 2 par la pratique, Pascal Roques 6ème Edition, Eyrolles, 2007.

  • [Blanc2006] UML pour les développeurs, Xavier Blanc, Eyrolles, 2006.

  • [Longepe2006] Le projet d’urbanisation du S.I., C. Longépé, 3ème édition, Dunod, 2006.

  • [Gillet2008] Management des SI, M. & P. Gillet, Dunod, 2008.

  • [Muller] Modélisation objet avec UML. Pierre-Alain Muller & Nathalie Gaetner, Eyrolles, 2003.

  • [RUP] http://fr.wikipedia.org/wiki/Unified_Process

  • [AndroidFundamentals] http://developer.android.com/guide/components/fundamentals.html

Glossary

Ressources

The following definitions are only informative. You can find usefull other sources here:

ATL

_ATLAS Transformation Language

DRY

Don’t Repeat Yourself

EMF

_Eclipse Modeling Framework

IHM

Interface Homme-Machine

MCF

Modèle Conceptuel des Flux

MCT

Modèle Conceptuel des Traitements

MOA/MOE

Maîtrise d’ouvrage (MOA) Maîtrise d’oeuvre (MOE)

MOF

Modèle Organisationnel des Flux

MOT

Modèle Organisationnel des Traitements

OMG

Object Management Group

PPN

Programme Pédagogique National

SEF

Schéma d'Enchaînement des Fenêtres

SEP

Schéma d'Enchaînement des Pages

SI

Système d'Information

SNI

Schéma de Navigation d'Interfaces

SO

Système Organisationnel

SysML

System Modeling Language

TRL

Technology Readiness Level

URL

Universal Ressource Locator

About…​

This web site has been developped by JMB using the following (open and free) tools: