Projet Android (LI260) Cours 4

Size: px
Start display at page:

Download "Projet Android (LI260) Cours 4"

Transcription

1 Projet Android (LI260) Cours 4 Nicolas Baskiotis Université Pierre et Marie Curie (UPMC) Laboratoire d Informatique de Paris 6 (LIP6) S2-2013/2014

2 Résumé sur le multi-thread Service : facile opérations courtes bloque le thread principal doit lancer dans de nouveaux threads les opérations longues Thread : difficile générique pour toute opération à exécuter dans un autre thread IntentService : facile exécuté dans un thread parallèle une seule exécution à la fois, sans interaction avec les autres threads communication à l aide de message (pour la fin par exemple) ASyncTask : facile pour des opérations de durée moyenne (quelques secondes) exécuté dans un thread parallèle communication limitée avec l UI (progression) doit être créé par le thread principal

3 Plan

4 Opérations de stockage Options : Préférences : données primitives, légères, par clé-valeur Données privées : stockage interne ou externe, non partagée, détruites quand l application est désinstallée Données partagées : photos, images, sons en stockage externe Base de données : SQLite, accessible uniquement à l intérieur de l application Réseau : stockage en ligne

5 Préférences Caractéristiques : seulement type primitif (int, double, boolean,... ) persistant (même si l application est tuée) dans un seul fichier (Preferences) ou dans plusieurs fichiers (SharedPreferences) Utilisation lecture : (SharedPreferences getsharedpreferences(nom,0)).getint( myvar,defaut), écriture : un objet Editor (getsharedpreferences(nom,0).edit().putint( myvar,val)

6 Exemple p u b l i c class PreferenceDemo0 extends A c t i v i t y implements OnClickListener { Boolean fancyprefchosen = false ; final String MYPREFS = MyPreferences 001 ; SharedPreferences mysharedpreferences ; SharedPreferences. E d i t o r myeditor public void oncreate ( Bundle savedinstancestate ) { super. oncreate ( savedinstancestate ) ;... mysharedpreferences = getsharedpreferences (MYPREFS, 0 ) ; myeditor = mysharedpreferences. edit ( ) ; i f ( mysharedpreferences!= null && mysharedpreferences. contains ( backcolor ) ) { applysavedpreferences ( ) ; else { Toast. maketext ( getapplicationcontext ( ), No Preferences found, 1 ). show ( ) ; p u b l i c void onclick ( View v ) { myeditor. c l e a r ( ) ; myeditor. putint ( backcolor, Color.BLACK ) ; / / black background myeditor. p u t I n t ( t e x t S i z e, 1 2 ) ; myeditor. p u t S t r i n g ( t e x t S t y l e, bold ) ; / / fancy bold myeditor. p u t I n t ( l a y o u t C o l o r, Color.GREEN) ; / / fancy green myeditor. commit ( ) ; protected void onpause ( ) { myeditor. p u t S t r i n g ( DateLastExecution, new Date ( ). t o L o c a l e S t r i n g ( ) ) ; myeditor. commit ( ) ; super. onpause ( ) ; p u b l i c void applysavedpreferences ( ) { int backcolor = mysharedpreferences. getint ( backcolor, Color.BLACK ) ; int textsize = mysharedpreferences. getint ( textsize, 12); String textstyle = mysharedpreferences. getstring ( textstyle, normal ) ; int layoutcolor = mysharedpreferences. getint ( layoutcolor, Color.DKGRAY) ; String msg = color + backcolor + \n + size + textsize+ \n + style + textstyle ; Toast. maketext ( getapplicationcontext ( ), msg, 1 ). show ( ) ;

7 Base de données SQLite léger pour de petites bases, sans opérations intensives beaucoup de sucre syntaxique pour aider à la programmation soit accès direct avec toute la gestion des exceptions soit par l intermédiaire de l héritage En pratique, pour chaque table : classe SQLiteOpenHelper : gestion de la création et de la mise-à-jour (schéma) d une table de la bd une classe modèle : décrit l objet que l on stocke dans la table DAO : data access object, classe encapsulant les requêtes pour la manipulation des données

8 Opérations usuelles en pratique.execsql() : exécute une action SQL classe Cursor : curseur sur le résultat de requête : isfirst(), islast(), movetofirst(), movetonext(), movetolast() getstring(int i), getint(int i), getcolumnname(), getcolumncount() classe ContentValues : stocke des paires champs/valeurs.put(key,val) modification : public long insert(string table, String nullcolumnhack, ContentValues values) public int update( String table, ContentValues values, String whereclause, String[] whereargs) public int delete( String table, String whereclause, String[] whereargs) Exemple : db.update( "tbl", (new ContentValues()).put( name, Moi ), "recid >? and recid <?", { 2, 7 )

9 Exemple : le modèle p u b l i c class Comment { private long id ; p r i v a t e S t r i n g comment ; public long getid ( ) { return id ; p u b l i c void s e t I d ( long i d ) { t h i s. i d = i d ; public String getcomment ( ) { r e t u r n comment ; p u b l i c void setcomment ( S t r i n g comment ) { t h i s. comment = comment ; / / W i l l be used by the ArrayAdapter i n the public String tostring ( ) { r e t u r n comment ;

10 Exemple : création p u b l i c class MySQLiteHelper extends SQLiteOpenHelper { public static final String TABLE COMMENTS = comments ; public s t a t i c f i n a l String COLUMN ID = i d ; p u b l i c s t a t i c f i n a l S t r i n g COLUMN COMMENT = comment ; private static final String DATABASE NAME = commments. db ; p r i v a t e s t a t i c f i n a l i n t DATABASE VERSION = 1; / / Database c r e a t i o n s q l statement p r i v a t e s t a t i c f i n a l S t r i n g DATABASE CREATE = create t a b l e + TABLE COMMENTS + ( + COLUMN ID + integer primary key autoincrement, + COLUMNCOMMENT + t e x t not n u l l ) ; ; public MySQLiteHelper ( Context context ) { super ( context, DATABASE NAME, null, DATABASE VERSION ) public void oncreate ( SQLiteDatabase database ) { database. execsql (DATABASE CREATE ) public void onupgrade ( SQLiteDatabase db, int oldversion, int newversion ) { Log.w( MySQLiteHelper. class. getname ( ), Upgrading database from version + oldversion + to + newversion +, which w i l l destroy all old data ) ; db. execsql ( DROP TABLE IF EXISTS + TABLE COMMENTS ) ; oncreate ( db ) ;

11 Exemple : DAO p u b l i c class CommentsDataSource { private SQLiteDatabase database ; p r i v a t e MySQLiteHelper dbhelper ; private String [ ] allcolumns = { MySQLiteHelper.COLUMN ID, MySQLiteHelper.COLUMNCOMMENT ; public CommentsDataSource ( Context context ) {dbhelper = new MySQLiteHelper ( context ); public void open ( ) throws SQLException {database = dbhelper. getwritabledatabase ( ) ; public void close ( ) {dbhelper. close ( ) ; p u b l i c Comment createcomment ( S t r i n g comment ) { ContentValues values = new ContentValues ( ) ; values. put ( MySQLiteHelper.COLUMNCOMMENT, comment ) ; long insertid = database. insert ( MySQLiteHelper.TABLE COMMENTS, null, values ) ; Cursor cursor = database. query ( MySQLiteHelper.TABLE COMMENTS, allcolumns, MySQLiteHelper.COLUMN ID + = + insertid, null, null, null, null ) ; cursor. movetofirst ( ) ; Comment newcomment = cursortocomment ( cursor ) ; cursor. close ( ) ; r e t u r n newcomment ;

12 Exemple : DAO p u b l i c void deletecomment (Comment comment ) { long id = comment. getid ( ) ; System. out. p r i n t l n ( Comment deleted with i d : + i d ) ; database. delete ( MySQLiteHelper.TABLE COMMENTS, MySQLiteHelper.COLUMN ID + = + id, null ) ; public List<Comment> getallcomments ( ) { L i s t<comment> comments = new A r r a y L i s t<comment>(); Cursor cursor = database. query ( MySQLiteHelper.TABLE COMMENTS, allcolumns, null, null, null, null, n u l l ) ; cursor. movetofirst ( ) ; while (! cursor. i s A f t e r L a s t ( ) ) { Comment comment = cursortocomment ( cursor ) ; comments. add (comment ) ; cursor. movetonext ( ) ; cursor. close ( ) ; r e t u r n comments ; p r i v a t e Comment cursortocomment ( Cursor cursor ) { Comment comment = new Comment ( ) ; comment. s e t I d ( cursor. getlong ( 0 ) ) ; comment. setcomment ( cursor. g e t S t r i n g ( 1 ) ) ; r e t u r n comment ;

13 Exemple : classe principale p u b l i c class TestDatabaseActivity extends L i s t A c t i v i t y { p r i v a t e CommentsDataSource datasource ; public void oncreate ( Bundle savedinstancestate ) { super. oncreate ( savedinstancestate ) ; setcontentview (R. layout. main ) ; datasource = new CommentsDataSource ( this ) ; datasource. open ( ) ; L i s t<comment> values = datasource. getallcomments ( ) ; ArrayAdapter<Comment> adapter = new ArrayAdapter<Comment>(this, android.r. layout. s i m p l e l i s t i t e m 1, values ) ; s e t Li s t A d a p te r ( adapter ) ; public void onclick ( View view ) { ArrayAdapter<Comment> adapter = ( ArrayAdapter<Comment>) getlistadapter ( ) ; Comment comment = n u l l ; switch ( view. g e t I d ( ) ) { case R. i d. add : S t r i n g [ ] comments = new S t r i n g [ ] { Cool, Very nice, Hate i t ; i n t nextint = new Random ( ). nextint ( 3 ) ; comment = datasource. createcomment (comments [ n e x t I n t ] ) ; adapter. add (comment ) ; break ; case R. i d. d e l e t e : i f ( g e t L i s t A d a p t e r ( ). getcount ( ) > 0) { comment = (Comment) getlistadapter ( ). getitem ( 0 ) ; datasource. deletecomment (comment ) ; adapter. remove (comment ) ; break ; adapter. notifydatasetchanged ( ) ; protected void onresume ( ) { datasource. open ( ) ; super.onresume ( ) ; protected void onpause ( ) { datasource. close ( ) ; super. onpause ( ) ;

14 Plan

15 MVC : Model-View-Control Objectif : séparer les données (model) l interface graphique (view) la manipulation (control) Opérations sur les vues properties : couleur, police, taille listeners : méthodes à l écoute des actions sur la vue focus visibilité

16 Exemples

17 Exemples

18 Mots-clés génériques orientation : vertical, horizontal fill model : match parent, wrap contents weight : 0,1,2,... gravity, layout gravity : top, bottom, center padding, margin layout alignparent{top,bottom,left,right, layout center{inparent,centervertical,centerhorizontal layout {above,below,toleftof,torightof layout span

19 List Widgets

20 ArrayAdapter Héritage de BaseAdapter accepte un tableau d objet utilise la méthode tostring() de l objet utilise un TextView pour afficher chaque objet personnalisation pour afficher des objets plus complexes S t r i n g [ ] items = { Data 0, Data 1, Data 2, Data 3, Data 4, Data 5, Data 6, Data 7 ; ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, android.r. layout. s i m p l e l i s t i t e m 1, items ) ;

21 Exemple 1 XML Layout <LinearLayout xmlns : android= http : / / schemas. android.com / apk / res / android xmlns : tools= http : / / schemas. android.com / tools android : layout width= match parent android : layout height= match parent android : o r i e n t a t i o n = v e r t i c a l > <TextView android : / txtmsg android : layout width= match parent android : l a y o u t h e i g h t = wrap content android : background= # f f f f f f 0 0 android : t e x t = Using ListViews... android : t e x t S i z e = 16sp /> <ListView android : i d i d / m y l i s t android : layout width= match parent android : layout height= match parent > </ListView> </LinearLayout>

22 Exemple 1 p u b l i c class ListViewDemo2 extends A c t i v i t y { S t r i n g [ ] items = { Data 0, Data 1, Data 2, Data 3, Data 4, Data 5, Data 6, Data 7 ; ListView mylistview ; TextView txtmsg public void oncreate ( Bundle savedinstancestate ) { super. oncreate ( savedinstancestate ) ; setcontentview (R. layout. activity main ) ; mylistview = ( ListView ) findviewbyid (R. id. my list ) ; ArrayAdapter<String> aa = new ArrayAdapter<String>(this, android.r. layout. s i m p l e l i s t i t e m 1, items ) ; mylistview. setadapter (aa ) ; txtmsg = ( TextView ) findviewbyid (R. id. txtmsg ) ; mylistview. setonitemclicklistener (new OnItemClickListener ( ) public void onitemclick ( AdapterView<?> av, View v, i n t position, long i d ) { String t e x t = Position : + p o s i t i o n + \ndata : + items [ position ] ; txtmsg. settext ( text ) ; );

23 Exemple 2 Activity XML <?xml version= 1.0 encoding= UTF 8?> <LinearLayout xmlns : android= http : / / schemas. android.com / apk / res / android android : layout width= match parent android : l a y o u t h e i g h t = wrap content android : background= # f f f f f f f f android : o r i e n t a t i o n = v e r t i c a l android : padding= 2dp > <TextView android : / txtmsg android : layout width= match parent android : l a y o u t h e i g h t = wrap content android : background= # f f 0 0 f f 0 0 android : t e x t = s c r o l l and c l i c k to s e l e c t... android : textappearance=? android : attr / textappearancelarge /> <H o r i z o n t a l S c r o l l V i e w android : layout width= match parent android : l a y o u t h e i g h t = wrap content android : background= #44aaaaaa > <LinearLayout android : / viewgroup android : l a y o u t w i d t h = wrap content android : l a y o u t h e i g h t = wrap content android : o r i e n t a t i o n = h o r i z o n t a l android : padding= 10 dip > </LinearLayout> </H o r i z o n t a l S c r o l l V i e w> <ImageView android : / imageselected android : l a y o u t w i d t h = wrap content android : l a y o u t h e i g h t = wrap content android : l ay ou t w eig ht = 2 /> </LinearLayout>

24 Exemple 2 Icon Frame XML <?xml version= 1.0 encoding= UTF 8?> <LinearLayout xmlns : android= h t t p : / / schemas. android. com / apk / res / android android : layout width= match parent android : l a y o u t h e i g h t = wrap content android : o r i e n t a t i o n = v e r t i c a l > <ImageView android : / icon android : l a y o u t w i d t h = 80dp android : l a y o u t h e i g h t = 80dp android : paddingleft= 2dp android : paddingright= 2dp android : paddingtop= 2dp android : / i c l a u n c h e r /> <TextView android : i d i d / caption android : layout width= match parent android : l a y o u t h e i g h t = wrap content android : background= #55 ffff00 android : t e x t S i z e = 20sp /> </LinearLayout>

25 Exemple 2 p u b l i c class M a i n A c t i v i t y extends A c t i v i t y { TextView txtmsg ; ViewGroup scrollviewgroup ; ImageView icon ; TextView caption ; S t r i n g [ ] items = { Data 1,.. Integer [ ] thumbnails = { R. drawable. pic01 small,... Integer [ ] largeimages = { R. drawable. pic01 large,... ImageView imageselected ; protected void oncreate ( Bundle savedinstancestate ) { super. oncreate ( savedinstancestate ) ; setcontentview (R. layout. activity main ) ; txtmsg = ( TextView ) findviewbyid (R. id. txtmsg ) ; imageselected = ( ImageView ) findviewbyid (R. id. imageselected ) ; scrollviewgroup = ( ViewGroup ) findviewbyid (R. id. viewgroup ) ; f o r ( i n t i = 0; i < items. length ; i ++) { f i n a l View singleframe = getlayoutinflater ( ). i n f l a t e ( R. layout. frame icon caption, n u l l ) ; singleframe. s e t I d ( i ) ; TextView caption = ( TextView ) singleframe. findviewbyid (R. id. caption ) ; ImageView icon = ( ImageView ) singleframe. findviewbyid (R. id. icon ) ; icon. setimageresource ( thumbnails [ i ] ) ; caption. settext ( items [ i ] ) ; scrollviewgroup. addview ( singleframe ) ; singleframe. setonclicklistener (new View. OnClickListener ( ) { p u b l i c void onclick ( View v ) { S t r i n g t e x t = Selected p o s i t i o n : + singleframe. g e t I d ( ) ; txtmsg. settext ( text ) ; showlargeimage ( singleframe. g e t I d ( ) ) ; ); protected void showlargeimage ( int frameid ) { Drawable selectedlargeimage = getresources ( ). getdrawable ( largeimages [ frameid ] ) ; imageselected. setbackground ( selectedlargeimage ) ;

Langages Orientés Objet Java

Langages Orientés Objet Java Langages Orientés Objet Java Exceptions Arnaud LANOIX Université Nancy 2 24 octobre 2006 Arnaud LANOIX (Université Nancy 2) Langages Orientés Objet Java 24 octobre 2006 1 / 32 Exemple public class Example

More information

Creating a List UI with Android. Michele Schimd - 2013

Creating a List UI with Android. Michele Schimd - 2013 Creating a List UI with Android Michele Schimd - 2013 ListActivity Direct subclass of Activity By default a ListView instance is already created and rendered as the layout of the activity mylistactivit.getlistview();

More information

Basics of Android Development 1

Basics of Android Development 1 Departamento de Engenharia Informática Minds-On Basics of Android Development 1 Paulo Baltarejo Sousa [email protected] 2016 1 The content of this document is based on the material presented at http://developer.android.com

More information

Saindo da zona de conforto resolvi aprender Android! by Daniel Baccin

Saindo da zona de conforto resolvi aprender Android! by Daniel Baccin Saindo da zona de conforto resolvi aprender Android! by Daniel Baccin Mas por que Android??? Documentação excelente Crescimento no número de apps Fonte: http://www.statista.com/statistics/266210/number-of-available-applications-in-the-google-play-store/

More information

ANDROID APPS DEVELOPMENT FOR MOBILE GAME

ANDROID APPS DEVELOPMENT FOR MOBILE GAME ANDROID APPS DEVELOPMENT FOR MOBILE GAME Lecture 7: Data Storage and Web Services Overview Android provides several options for you to save persistent application data. Storage Option Shared Preferences

More information

Introduction. GEAL Bibliothèque Java pour écrire des algorithmes évolutionnaires. Objectifs. Simplicité Evolution et coévolution Parallélisme

Introduction. GEAL Bibliothèque Java pour écrire des algorithmes évolutionnaires. Objectifs. Simplicité Evolution et coévolution Parallélisme GEAL 1.2 Generic Evolutionary Algorithm Library http://dpt-info.u-strasbg.fr/~blansche/fr/geal.html 1 /38 Introduction GEAL Bibliothèque Java pour écrire des algorithmes évolutionnaires Objectifs Généricité

More information

Les fragments. Programmation Mobile Android Master CCI. Une application avec deux fragments. Premier layout : le formulaire

Les fragments. Programmation Mobile Android Master CCI. Une application avec deux fragments. Premier layout : le formulaire Programmation Mobile Android Master CCI Bertrand Estellon Aix-Marseille Université March 23, 2015 Bertrand Estellon (AMU) Android Master CCI March 23, 2015 1 / 266 Les fragments Un fragment : représente

More information

POB-JAVA Documentation

POB-JAVA Documentation POB-JAVA Documentation 1 INTRODUCTION... 4 2 INSTALLING POB-JAVA... 5 Installation of the GNUARM compiler... 5 Installing the Java Development Kit... 7 Installing of POB-Java... 8 3 CONFIGURATION... 9

More information

Android Persistency: SQL Databases

Android Persistency: SQL Databases 17 Android Persistency: Victor Matos Cleveland State University Notes are based on: Android Developers http://developer.android.com/index.html 17. Android Using SQL databases in Android. Android (as well

More information

MAP524/DPS924 MOBILE APP DEVELOPMENT (ANDROID) MIDTERM TEST OCTOBER 2013 STUDENT NAME STUDENT NUMBER

MAP524/DPS924 MOBILE APP DEVELOPMENT (ANDROID) MIDTERM TEST OCTOBER 2013 STUDENT NAME STUDENT NUMBER MAP524/DPS924 MOBILE APP DEVELOPMENT (ANDROID) MIDTERM TEST OCTOBER 2013 STUDENT NAME STUDENT NUMBER Please answer all questions on the question sheet This is an open book/notes test. You are allowed to

More information

«Object-Oriented Multi-Methods in Cecil» Craig Chambers (Cours IFT6310, H08)

«Object-Oriented Multi-Methods in Cecil» Craig Chambers (Cours IFT6310, H08) «Object-Oriented Multi-Methods in Cecil» Craig Chambers (Cours IFT6310, H08) Mathieu Lemoine 2008/02/25 Craig Chambers : Professeur à l Université de Washington au département de Computer Science and Engineering,

More information

App Development for Smart Devices. Lec #4: Files, Saving State, and Preferences

App Development for Smart Devices. Lec #4: Files, Saving State, and Preferences App Development for Smart Devices CS 495/595 - Fall 2011 Lec #4: Files, Saving State, and Preferences Tamer Nadeem Dept. of Computer Science Some slides adapted from Stephen Intille Objective Data Storage

More information

Thursday, February 7, 2013. DOM via PHP

Thursday, February 7, 2013. DOM via PHP DOM via PHP Plan PHP DOM PHP : Hypertext Preprocessor Langage de script pour création de pages Web dynamiques Un ficher PHP est un ficher HTML avec du code PHP

More information

Xamarin Android Application Development

Xamarin Android Application Development Xamarin Android Application Development Diptimaya Patra This book is for sale at http://leanpub.com/xamarin-android-app-dev This version was published on 2014-03-16 This is a Leanpub book. Leanpub empowers

More information

getsharedpreferences() - Use this if you need multiple preferences files identified by name, which you specify with the first parameter.

getsharedpreferences() - Use this if you need multiple preferences files identified by name, which you specify with the first parameter. Android Storage Stolen from: developer.android.com data-storage.html i Data Storage Options a) Shared Preferences b) Internal Storage c) External Storage d) SQLite Database e) Network Connection ii Shared

More information

Now that we have the Android SDK, Eclipse and Phones all ready to go we can jump into actual Android development.

Now that we have the Android SDK, Eclipse and Phones all ready to go we can jump into actual Android development. Android Development 101 Now that we have the Android SDK, Eclipse and Phones all ready to go we can jump into actual Android development. Activity In Android, each application (and perhaps each screen

More information

Specialized Android APP Development Program with Java (SAADPJ) Duration 2 months

Specialized Android APP Development Program with Java (SAADPJ) Duration 2 months Specialized Android APP Development Program with Java (SAADPJ) Duration 2 months Our program is a practical knowledge oriented program aimed at making innovative and attractive applications for mobile

More information

CSS : petits compléments

CSS : petits compléments CSS : petits compléments Université Lille 1 Technologies du Web CSS : les sélecteurs 1 au programme... 1 ::before et ::after 2 compteurs 3 media queries 4 transformations et transitions Université Lille

More information

Lab 3 It s all about data - the Android SQLite Database

Lab 3 It s all about data - the Android SQLite Database Lab 3 It s all about data - the Android SQLite Database Getting started This is the third in a series of labs that allow you to develop the MyRuns App. The goal of the app is to capture and display (using

More information

Cours de Java. Sciences-U Lyon. Java - Introduction Java - Fondamentaux Java Avancé. http://www.rzo.free.fr

Cours de Java. Sciences-U Lyon. Java - Introduction Java - Fondamentaux Java Avancé. http://www.rzo.free.fr Cours de Java Sciences-U Lyon Java - Introduction Java - Fondamentaux Java Avancé http://www.rzo.free.fr Pierre PARREND 1 Octobre 2004 Sommaire Java Introduction Java Fondamentaux Java Avancé GUI Graphical

More information

TP : Système de messagerie - Fichiers properties - PrepareStatement

TP : Système de messagerie - Fichiers properties - PrepareStatement TP : Système de messagerie - Fichiers properties - PrepareStatement exelib.net Une société souhaite mettre en place un système de messagerie entre ses employés. Les travaux de l équipe chargée de l analyse

More information

Brazil + JDBC Juin 2001, [email protected] http://jfod.cnam.fr/tp_cdi/douin/

Brazil + JDBC Juin 2001, douin@cnam.fr http://jfod.cnam.fr/tp_cdi/douin/ Brazil + JDBC Juin 2001, [email protected] http://jfod.cnam.fr/tp_cdi/douin/ version du 26 Mai 2003 : JDBC-SQL et Brazil pré-requis : lecture de Tutorial JDBC de Sun Bibliographie Brazil [Bra00]www.sun.com/research/brazil

More information

Introduction au BIM. ESEB 38170 Seyssinet-Pariset Economie de la construction email : [email protected]

Introduction au BIM. ESEB 38170 Seyssinet-Pariset Economie de la construction email : contact@eseb.fr Quel est l objectif? 1 La France n est pas le seul pays impliqué 2 Une démarche obligatoire 3 Une organisation plus efficace 4 Le contexte 5 Risque d erreur INTERVENANTS : - Architecte - Économiste - Contrôleur

More information

Q1. What method you should override to use Android menu system?

Q1. What method you should override to use Android menu system? AND-401 Exam Sample: Q1. What method you should override to use Android menu system? a. oncreateoptionsmenu() b. oncreatemenu() c. onmenucreated() d. oncreatecontextmenu() Answer: A Q2. What Activity method

More information

Licence Informatique Année 2005-2006. Exceptions

Licence Informatique Année 2005-2006. Exceptions Université Paris 7 Java Licence Informatique Année 2005-2006 TD n 8 - Correction Exceptions Exercice 1 La méthode parseint est spécifiée ainsi : public static int parseint(string s) throws NumberFormatException

More information

How To Write A Program In Java (Programming) On A Microsoft Macbook Or Ipad (For Pc) Or Ipa (For Mac) (For Microsoft) (Programmer) (Or Mac) Or Macbook (For

How To Write A Program In Java (Programming) On A Microsoft Macbook Or Ipad (For Pc) Or Ipa (For Mac) (For Microsoft) (Programmer) (Or Mac) Or Macbook (For Projet Java Responsables: Ocan Sankur, Guillaume Scerri (LSV, ENS Cachan) Objectives - Apprendre à programmer en Java - Travailler à plusieurs sur un gros projet qui a plusieurs aspects: graphisme, interface

More information

How to develop your own app

How to develop your own app How to develop your own app It s important that everything on the hardware side and also on the software side of our Android-to-serial converter should be as simple as possible. We have the advantage that

More information

Getting Started: Creating a Simple App

Getting Started: Creating a Simple App Getting Started: Creating a Simple App What You will Learn: Setting up your development environment Creating a simple app Personalizing your app Running your app on an emulator The goal of this hour is

More information

Android on Intel Course App Development - Advanced

Android on Intel Course App Development - Advanced Android on Intel Course App Development - Advanced Paul Guermonprez www.intel-software-academic-program.com [email protected] Intel Software 2013-02-08 Persistence Preferences Shared preference

More information

TUTORIAL. BUILDING A SIMPLE MAPPING APPLICATION

TUTORIAL. BUILDING A SIMPLE MAPPING APPLICATION Cleveland State University CIS493. Mobile Application Development Using Android TUTORIAL. BUILDING A SIMPLE MAPPING APPLICATION The goal of this tutorial is to create a simple mapping application that

More information

Remote Method Invocation

Remote Method Invocation 1 / 22 Remote Method Invocation Jean-Michel Richer [email protected] http://www.info.univ-angers.fr/pub/richer M2 Informatique 2010-2011 2 / 22 Plan Plan 1 Introduction 2 RMI en détails

More information

INTRODUCTION TO ANDROID CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 11 02/15/2011

INTRODUCTION TO ANDROID CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 11 02/15/2011 INTRODUCTION TO ANDROID CSCI 4448/5448: OBJECT-ORIENTED ANALYSIS & DESIGN LECTURE 11 02/15/2011 1 Goals of the Lecture Present an introduction to the Android Framework Coverage of the framework will be

More information

TP N 10 : Gestion des fichiers Langage JAVA

TP N 10 : Gestion des fichiers Langage JAVA TP N 10 : Gestion des fichiers Langage JAVA Rappel : Exemple d utilisation de FileReader/FileWriter import java.io.*; public class Copy public static void main(string[] args) throws IOException File inputfile

More information

Chapter 2 Getting Started

Chapter 2 Getting Started Welcome to Android Chapter 2 Getting Started Android SDK contains: API Libraries Developer Tools Documentation Sample Code Best development environment is Eclipse with the Android Developer Tool (ADT)

More information

Detection of water leakage using laser images from 3D laser scanning data

Detection of water leakage using laser images from 3D laser scanning data Detection of water leakage using laser images from 3D laser scanning data QUANHONG FENG 1, GUOJUAN WANG 2 & KENNERT RÖSHOFF 3 1 Berg Bygg Konsult (BBK) AB,Ankdammsgatan 20, SE-171 43, Solna, Sweden (e-mail:[email protected])

More information

site et appel d'offres

site et appel d'offres Définition des besoins et élaboration de l'avant-projet Publication par le client de l'offre (opération sur le externe) Start: 16/07/02 Finish: 16/07/02 ID: 1 Dur: 0 days site et appel d'offres Milestone

More information

Università Degli Studi di Parma. Distributed Systems Group. Android Development. Lecture 2 Android Platform. Marco Picone - 2012

Università Degli Studi di Parma. Distributed Systems Group. Android Development. Lecture 2 Android Platform. Marco Picone - 2012 Android Development Lecture 2 Android Platform Università Degli Studi di Parma Lecture Summary 2 The Android Platform Dalvik Virtual Machine Application Sandbox Security and Permissions Traditional Programming

More information

Audit de sécurité avec Backtrack 5

Audit de sécurité avec Backtrack 5 Audit de sécurité avec Backtrack 5 DUMITRESCU Andrei EL RAOUSTI Habib Université de Versailles Saint-Quentin-En-Yvelines 24-05-2012 UVSQ - Audit de sécurité avec Backtrack 5 DUMITRESCU Andrei EL RAOUSTI

More information

Android Development. Marc Mc Loughlin

Android Development. Marc Mc Loughlin Android Development Marc Mc Loughlin Android Development Android Developer Website:h:p://developer.android.com/ Dev Guide Reference Resources Video / Blog SeCng up the SDK h:p://developer.android.com/sdk/

More information

Android Application Development

Android Application Development Android Application Development Self Study Self Study Guide Content: Course Prerequisite Course Content Android SDK Lab Installation Guide Start Training Be Certified Exam sample Course Prerequisite The

More information

Android Java Live and In Action

Android Java Live and In Action Android Java Live and In Action Norman McEntire Founder, Servin Corp UCSD Extension Instructor [email protected] Copyright (c) 2013 Servin Corp 1 Opening Remarks Welcome! Thank you! My promise

More information

Admin. Mobile Software Development Framework: Android Activity, View/ViewGroup, External Resources. Recap: TinyOS. Recap: J2ME Framework

Admin. Mobile Software Development Framework: Android Activity, View/ViewGroup, External Resources. Recap: TinyOS. Recap: J2ME Framework Admin. Mobile Software Development Framework: Android Activity, View/ViewGroup, External Resources Homework 2 questions 10/9/2012 Y. Richard Yang 1 2 Recap: TinyOS Hardware components motivated design

More information

TP1 : Correction. Rappels : Stream, Thread et Socket TCP

TP1 : Correction. Rappels : Stream, Thread et Socket TCP Université Paris 7 M1 II Protocoles réseaux TP1 : Correction Rappels : Stream, Thread et Socket TCP Tous les programmes seront écrits en Java. 1. (a) Ecrire une application qui lit des chaines au clavier

More information

Android Application Development Lecture Notes INDEX

Android Application Development Lecture Notes INDEX Android Application Development Lecture Notes INDEX Lesson 1. Introduction 1-2 Mobile Phone Evolution 1-3 Hardware: What is inside a Smart Cellular Phone? 1-4 Hardware: Reusing Cell Phone Frequencies 1-5

More information

Calcul parallèle avec R

Calcul parallèle avec R Calcul parallèle avec R ANF R Vincent Miele CNRS 07/10/2015 Pour chaque exercice, il est nécessaire d ouvrir une fenètre de visualisation des processes (Terminal + top sous Linux et Mac OS X, Gestionnaire

More information

DHI a.s. Na Vrsich 51490/5, 100 00, Prague 10, Czech Republic ( [email protected], [email protected] )

DHI a.s. Na Vrsich 51490/5, 100 00, Prague 10, Czech Republic ( t.metelka@dhi.cz, z.svitak@dhi.cz ) NOVATECH Rehabilitation strategies in wastewater networks as combination of operational, property and model information Stratégies de réhabilitation des réseaux d'égouts combinant des données d exploitation,

More information

Android Application Development - Exam Sample

Android Application Development - Exam Sample Android Application Development - Exam Sample 1 Which of these is not recommended in the Android Developer's Guide as a method of creating an individual View? a Create by extending the android.view.view

More information

Android Basics. Xin Yang 2016-05-06

Android Basics. Xin Yang 2016-05-06 Android Basics Xin Yang 2016-05-06 1 Outline of Lectures Lecture 1 (45mins) Android Basics Programming environment Components of an Android app Activity, lifecycle, intent Android anatomy Lecture 2 (45mins)

More information

Sun Management Center Change Manager 1.0.1 Release Notes

Sun Management Center Change Manager 1.0.1 Release Notes Sun Management Center Change Manager 1.0.1 Release Notes Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A. Part No: 817 0891 10 May 2003 Copyright 2003 Sun Microsystems, Inc. 4150

More information

TP JSP : déployer chaque TP sous forme d'archive war

TP JSP : déployer chaque TP sous forme d'archive war TP JSP : déployer chaque TP sous forme d'archive war TP1: fichier essai.jsp Bonjour Le Monde JSP Exemple Bonjour Le Monde. Après déploiement regarder dans le répertoire work de l'application

More information

Persistent Data Storage. Akhilesh Tyagi

Persistent Data Storage. Akhilesh Tyagi Persistent Data Storage Akhilesh Tyagi Need to Save/Restore When an Activity is destroyed its state needs to be saved (due to orientation change) You may have personal persistent data. (key, value) pair

More information

ELET4133: Embedded Systems. Topic 15 Sensors

ELET4133: Embedded Systems. Topic 15 Sensors ELET4133: Embedded Systems Topic 15 Sensors Agenda What is a sensor? Different types of sensors Detecting sensors Example application of the accelerometer 2 What is a sensor? Piece of hardware that collects

More information

Getting Started with Android Programming (5 days) with Android 4.3 Jelly Bean

Getting Started with Android Programming (5 days) with Android 4.3 Jelly Bean Getting Started with Android Programming (5 days) with Android 4.3 Jelly Bean Course Description Getting Started with Android Programming is designed to give students a strong foundation to develop apps

More information

Android Application Development Course Program

Android Application Development Course Program Android Application Development Course Program Part I Introduction to Programming 1. Introduction to programming. Compilers, interpreters, virtual machines. Primitive data types, variables, basic operators,

More information

Note concernant votre accord de souscription au service «Trusted Certificate Service» (TCS)

Note concernant votre accord de souscription au service «Trusted Certificate Service» (TCS) Note concernant votre accord de souscription au service «Trusted Certificate Service» (TCS) Veuillez vérifier les éléments suivants avant de nous soumettre votre accord : 1. Vous avez bien lu et paraphé

More information

Frameworks & Android. Programmeertechnieken, Tim Cocx

Frameworks & Android. Programmeertechnieken, Tim Cocx Frameworks & Android Programmeertechnieken, Tim Cocx Discover thediscover world atthe Leiden world University at Leiden University Software maken is hergebruiken The majority of programming activities

More information

Les Broadcast Receivers...

Les Broadcast Receivers... Les Broadcast Receivers... http://developer.android.com/reference/android/content/broadcastreceiver.html Mécanisme qui, une fois «enregistré» dans le système, peut recevoir des Intents Christophe Logé

More information

INFORMATION BROCHURE

INFORMATION BROCHURE INFORMATION BROCHURE OF ADVANCE COURSE ON MOBILE APPLICATION DEVELOPMENT USING ANDROID PROGRAMMING (Specialization: Android Programming) National Institute of Electronics & Information Technology (An Autonomous

More information

Android Application Development Distance Learning Program Brochure

Android Application Development Distance Learning Program Brochure Android Application Development Distance Learning Program Brochure About gnxt Systems gnxt systems is an IT professional services and product development company. We provide global solutions in the areas

More information

Tutorial #1. Android Application Development Advanced Hello World App

Tutorial #1. Android Application Development Advanced Hello World App Tutorial #1 Android Application Development Advanced Hello World App 1. Create a new Android Project 1. Open Eclipse 2. Click the menu File -> New -> Other. 3. Expand the Android folder and select Android

More information

Android Programming: 2D Drawing Part 1: Using ondraw

Android Programming: 2D Drawing Part 1: Using ondraw 2012 Marty Hall Android Programming: 2D Drawing Part 1: Using ondraw Originals of Slides and Source Code for Examples: http://www.coreservlets.com/android-tutorial/ Customized Java EE Training: http://courses.coreservlets.com/

More information

Introduction to NaviGenie SDK Client API for Android

Introduction to NaviGenie SDK Client API for Android Introduction to NaviGenie SDK Client API for Android Overview 3 Data access solutions. 3 Use your own data in a highly optimized form 3 Hardware acceleration support.. 3 Package contents.. 4 Libraries.

More information

Android Persistency: Files

Android Persistency: Files 15 Android Persistency: Files Notes are based on: The Busy Coder's Guide to Android Development by Mark L. Murphy Copyright 2008-2009 CommonsWare, LLC. ISBN: 978-0-9816780-0-9 & Android Developers http://developer.android.com/index.html

More information

Web - Travaux Pratiques 1

Web - Travaux Pratiques 1 Web - Travaux Pratiques 1 Pour rappel, le squelette d une page HTML5 est la suivante : Syntaxe ... ... Une fois qu une page est terminée,

More information

060010702 Mobile Application Development 2014

060010702 Mobile Application Development 2014 Que 1: Short question answer. Unit 1: Introduction to Android and Development tools 1. What kind of tool is used to simulate Android application? 2. Can we use C++ language for Android application development?

More information

Android Basic XML Layouts

Android Basic XML Layouts Android Basic XML Layouts Notes are based on: The Busy Coder's Guide to Android Development by Mark L. Murphy Copyright 2008-2009 CommonsWare, LLC. ISBN: 978-0-9816780-0-9 & Android Developers http://developer.android.com/index.html

More information

Personnalisez votre intérieur avec les revêtements imprimés ALYOS design

Personnalisez votre intérieur avec les revêtements imprimés ALYOS design Plafond tendu à froid ALYOS technology ALYOS technology vous propose un ensemble de solutions techniques pour vos intérieurs. Spécialiste dans le domaine du plafond tendu, nous avons conçu et développé

More information

Solaris 10 Documentation README

Solaris 10 Documentation README Solaris 10 Documentation README Sun Microsystems, Inc. 4150 Network Circle Santa Clara, CA 95054 U.S.A. Part No: 817 0550 10 January 2005 Copyright 2005 Sun Microsystems, Inc. 4150 Network Circle, Santa

More information

Android Application Model

Android Application Model Android Application Model Content - Activities - Intent - Tasks / Applications - Lifecycle - Processes and Thread - Services - Content Provider Dominik Gruntz IMVS [email protected] 1 Android Software

More information

Android Development Exercises Version - 2012.02. Hands On Exercises for. Android Development. v. 2012.02

Android Development Exercises Version - 2012.02. Hands On Exercises for. Android Development. v. 2012.02 Hands On Exercises for Android Development v. 2012.02 WARNING: The order of the exercises does not always follow the same order of the explanations in the slides. When carrying out the exercises, carefully

More information

Getting started with Android and App Engine

Getting started with Android and App Engine Getting started with Android and App Engine About us Tim Roes Software Developer (Mobile/Web Solutions) at inovex GmbH www.timroes.de www.timroes.de/+ About us Daniel Bälz Student/Android Developer at

More information

Android UI Design. Android UI Design

Android UI Design. Android UI Design Android UI Design i Android UI Design Android UI Design ii Contents 1 Android UI Overview 1 1.1 Introduction...................................................... 1 1.2 Android App Structure and UI patterns........................................

More information

Building Database-Powered Mobile Applications

Building Database-Powered Mobile Applications 132 Informatica Economică vol. 16, no. 1/2012 Building Database-Powered Mobile Applications Paul POCATILU Bucharest University of Economic Studies [email protected] Almost all mobile applications use persistency

More information

Using the Android Sensor API

Using the Android Sensor API Using the Android Sensor API Juan José Marrón Department of Computer Science & Engineering [email protected] # Outline Sensors description: - Motion Sensors - Environmental Sensors - Positioning Sensors

More information

Android Concepts and Programming TUTORIAL 1

Android Concepts and Programming TUTORIAL 1 Android Concepts and Programming TUTORIAL 1 Kartik Sankaran [email protected] CS4222 Wireless and Sensor Networks [2 nd Semester 2013-14] 20 th January 2014 Agenda PART 1: Introduction to Android - Simple

More information

SDK Quick Start Guide

SDK Quick Start Guide SDK Quick Start Guide Table of Contents Requirements...3 Project Setup...3 Using the Low Level API...9 SCCoreFacade...9 SCEventListenerFacade...10 Examples...10 Call functionality...10 Messaging functionality...10

More information

Liste d'adresses URL

Liste d'adresses URL Liste de sites Internet concernés dans l' étude Le 25/02/2014 Information à propos de contrefacon.fr Le site Internet https://www.contrefacon.fr/ permet de vérifier dans une base de donnée de plus d' 1

More information

Application Development

Application Development BEGINNING Android Application Development Wei-Meng Lee WILEY Wiley Publishing, Inc. INTRODUCTION xv CHAPTER 1: GETTING STARTED WITH ANDROID PROGRAMMING 1 What Is Android? 2 Android Versions 2 Features

More information

Android Application Development: Hands- On. Dr. Jogesh K. Muppala [email protected]

Android Application Development: Hands- On. Dr. Jogesh K. Muppala muppala@cse.ust.hk Android Application Development: Hands- On Dr. Jogesh K. Muppala [email protected] Wi-Fi Access Wi-Fi Access Account Name: aadc201312 2 The Android Wave! 3 Hello, Android! Configure the Android SDK SDK

More information

Implementation of a HomeMatic simulator using Android

Implementation of a HomeMatic simulator using Android Fakultät für Informatik der Technische Universität München Bachelor s Thesis in Informatics Implementation of a HomeMatic simulator using Android Johannes Neutze Fakultät für Informatik der Technische

More information

Unrealized Gains in Stocks from the Viewpoint of Investment Risk Management

Unrealized Gains in Stocks from the Viewpoint of Investment Risk Management Unrealized Gains in Stocks from the Viewpoint of Investment Risk Management Naoki Matsuyama Investment Administration Department, The Neiji Mutual Life Insurance Company, 1-1 Marunouchi, 2-chome, Chiyoda-ku,

More information

Android Services. Android. Victor Matos

Android Services. Android. Victor Matos Lesson 22 Android Victor Matos Cleveland State University Notes are based on: Android Developers http://developer.android.com/index.html Portions of this page are reproduced from work created and shared

More information

23442 ECE 09402 7 Introduction to Android Mobile Programming 23442 ECE 09504 7 Special Topics: Android Mobile Programming

23442 ECE 09402 7 Introduction to Android Mobile Programming 23442 ECE 09504 7 Special Topics: Android Mobile Programming 23442 ECE 09402 7 Introduction to Android Mobile Programming 23442 ECE 09504 7 Special Topics: Android Mobile Programming Mondays 5:00 PM to 7:45 PM SJTP, Room 137 Portions From Android Programming The

More information

Introduction ToIP/Asterisk Quelques applications Trixbox/FOP Autres distributions Conclusion. Asterisk et la ToIP. Projet tuteuré

Introduction ToIP/Asterisk Quelques applications Trixbox/FOP Autres distributions Conclusion. Asterisk et la ToIP. Projet tuteuré Asterisk et la ToIP Projet tuteuré Luis Alonso Domínguez López, Romain Gegout, Quentin Hourlier, Benoit Henryon IUT Charlemagne, Licence ASRALL 2008-2009 31 mars 2009 Asterisk et la ToIP 31 mars 2009 1

More information

Technical Service Bulletin

Technical Service Bulletin Technical Service Bulletin FILE CONTROL CREATED DATE MODIFIED DATE FOLDER OpenDrive 02/05/2005 662-02-25008 Rev. : A Installation Licence SCO sur PC de remplacement English version follows. Lors du changement

More information

READ AND FOLLOW ALL SAFETY INSTRUCTIONS 1. DANGER RISK OF SHOCK DISCONNECT POWER BEFORE INSTALLATION

READ AND FOLLOW ALL SAFETY INSTRUCTIONS 1. DANGER RISK OF SHOCK DISCONNECT POWER BEFORE INSTALLATION UR Series LED Upgrade Kit Includes: 48" Linear Option IMPORTANT SAFEGUARDS When using electrical equipment, basic safety precautions should always be followed including the following: READ AND FOLLOW ALL

More information

Aucune validation n a été faite sur l exemple.

Aucune validation n a été faite sur l exemple. Cet exemple illustre l utilisation du Type BLOB dans la BD. Aucune validation n a été faite sur l exemple. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data;

More information

Memo bconsole. Memo bconsole

Memo bconsole. Memo bconsole Memo bconsole Page 1 / 24 Version du 10 Avril 2015 Page 2 / 24 Version du 10 Avril 2015 Sommaire 1 Voir les différentes travaux effectués par bacula3 11 Commande list jobs 3 12 Commande sqlquery 3 2 Afficher

More information