Programmation Mobile Android Master CCI
|
|
- Elizabeth Barber
- 5 years ago
- Views:
Transcription
1 Programmation Mobile Android Master CCI Bertrand Estellon Aix-Marseille Université March 23, 2015 Bertrand Estellon (AMU) Android Master CCI March 23, / 266
2 Navigation entre applications Nous allons voir comment envoyer un utilisateur : vers une autre application : Carte, Contact, Appel vers une autre activité de votre application Pour cela, nous allons utiliser les intentions ou intents Dans un Intent, on précise : une action (voir, éditer, envoyer, etc) une donnée (souvent une Uri désignant une ressource) Nous verrons également comment répondre à certains intents Bertrand Estellon (AMU) Android Master CCI March 23, / 266
3 Intentions Construire un Intent Bertrand Estellon (AMU) Android Master CCI March 23, / 266
4 Construire un Intent <LinearLayout xmlns:android="" android:layout_width="match_parent" android:layout_height="match_parent" > <EditText android:layout_width="wrap_content" android:layout_height="wrap_content" android:inputtype="phone" /> <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:onclick="call" /> </LinearLayout> Bertrand Estellon (AMU) Android Master CCI March 23, / 266
5 Construire un Intent public class MainActivity extends Activity { private EditText protected void oncreate(bundle savedinstancestate) { superoncreate(savedinstancestate); setcontentview(rlayoutactivity_main); number = (EditText)findViewById(Ridnumber); public void call(view v) { Uri uri = Uriparse("tel:"+numbergetText()); Intent callintent = new Intent(IntentACTION_DIAL, uri); startactivity(callintent); Bertrand Estellon (AMU) Android Master CCI March 23, / 266
6 Intentions Construire un Intent Bertrand Estellon (AMU) Android Master CCI March 23, / 266
7 Construire un Intent public class MainActivity extends Activity { private DatePicker datepicker; private TimePicker starttimepicker, protected void oncreate(bundle savedinstancestate) { superoncreate(savedinstancestate); setcontentview(rlayoutactivity_main); starttimepicker = (TimePicker)findViewById(RidstartTimePicker); endtimepicker = (TimePicker)findViewById(RidendTimePicker); datepicker = (DatePicker)findViewById(RiddatePicker); /* */ Bertrand Estellon (AMU) Android Master CCI March 23, / 266
8 Construire un Intent public class MainActivity extends Activity { private DatePicker datepicker; private TimePicker starttimepicker, endtimepicker; /* */ private long gettimeinmillis(timepicker timepicker) { int year = datepickergetyear(); int month = datepickergetmonth(); int day = datepickergetdayofmonth(); int hour = timepickergetcurrenthour(); int minute = timepickergetcurrentminute(); Calendar calendar = CalendargetInstance(); calendarset(year, month, day, hour, minute); return calendargettimeinmillis(); /* */ Bertrand Estellon (AMU) Android Master CCI March 23, / 266
9 Construire un Intent public class MainActivity extends Activity { private DatePicker datepicker; private TimePicker starttimepicker, endtimepicker; /* */ public void addevent(view view) { Intent calendarintent = new Intent(IntentACTION_INSERT, EventsCONTENT_URI); calendarintentputextra(calendarcontractextra_event_begin_time, gettimeinmillis(starttimepicker)); calendarintentputextra(calendarcontractextra_event_end_time, gettimeinmillis(endtimepicker)); startactivity(calendarintent); Bertrand Estellon (AMU) Android Master CCI March 23, / 266
10 Construire un Intent Dans la classe Intent, des actions sont définies : ACTION_CALL Initier un appel ACTION_EDIT Afficher et éditer des données ACTION_MAIN Démarrer une activité ACTION_SYNC Synchronizer des données avec un serveur ACTION_BATTERY_LOW Batterie faible ACTION_HEADSET_PLUG Écouteur branché ACTION_SCREEN_ON L écran s allume ACTION_TIMEZONE_CHANGED Changement de fuseau horaire Bertrand Estellon (AMU) Android Master CCI March 23, / 266
11 Une application peut contenir plusieurs activités : <?xml version="10" encoding="utf-8"?> <manifest xmlns:android=""> <application> <activity android:name="comexampletestmainactivity" android:label="@string/app_name" > <! > </activity> <activity android:name="comexampletestotheractivity" android:label="@string/title_other_activity" > </activity> </application> </manifest> Bertrand Estellon (AMU) Android Master CCI March 23, / 266
12 Une application peut contenir plusieurs activités : <?xml version="10" encoding="utf-8"?> <manifest xmlns:android=""> <application> <activity android:name="comexampletestmainactivity" android:label="@string/app_name" > <! > </activity> <activity android:name="comexampletesthelloworldactivity" android:label="@string/hello_world" > </activity> </application> </manifest> Bertrand Estellon (AMU) Android Master CCI March 23, / 266
13 Intentions Bertrand Estellon (AMU) Android Master CCI March 23, / 266
14 L activité principale : public class MainActivity extends Activity protected void oncreate(bundle savedinstancestate) { superoncreate(savedinstancestate); setcontentview(rlayoutactivity_main); public void sayhelloworld(view v) { Intent intent = new Intent(this, HelloWorldActivityclass); startactivity(intent); Avec un bouton dans le layout avec l attribut suivant : <Button onclick="sayhelloworld" /> Bertrand Estellon (AMU) Android Master CCI March 23, / 266
15 La seconde activité : public class HelloWorldActivity extends Activity protected void oncreate(bundle savedinstancestate) { superoncreate(savedinstancestate); setcontentview(rlayoutactivity_helloworld); Avec une zone de texte avec l attribut suivant : <TextView text="@string/hello_world" /> Remarque : Ne pas oublier de déclarer l activité dans le manifeste de l application Bertrand Estellon (AMU) Android Master CCI March 23, / 266
16 Intentions Bertrand Estellon (AMU) Android Master CCI March 23, / 266
17 L activité principale : public class MainActivity extends ListActivity { private ArrayAdapter<String> protected void oncreate(bundle savedinstancestate) { superoncreate(savedinstancestate); List<String> list = new ArrayList<String>(); for (int i = 0; i < 100; i++) listadd(""+i); adapter = new ArrayAdapter<String>(this, androidrlayoutsimple_list_item_1, list); setlistadapter(adapter); /* */ Bertrand Estellon (AMU) Android Master CCI March 23, / 266
18 L activité principale : public class MainActivity extends ListActivity { private ArrayAdapter<String> adapter; /* protected void onlistitemclick(listview l, View v, int pos, long id) { String element = adaptergetitem(pos); Intent intent = new Intent(this, ItemActivityclass); intentputextra("item", element); startactivity(intent); Bertrand Estellon (AMU) Android Master CCI March 23, / 266
19 Le layout de la deuxième activité : <RelativeLayout xmlns:android="" android:layout_width="match_parent" android:layout_height="match_parent"> <TextView android:id="@+id/item" android:layout_width="wrap_content" android:layout_height="wrap_content" /> </RelativeLayout> Bertrand Estellon (AMU) Android Master CCI March 23, / 266
20 Le code de la deuxième activité : public class ItemActivity extends Activity protected void oncreate(bundle savedinstancestate) { superoncreate(savedinstancestate); setcontentview(rlayoutactivity_item); TextView textview = (TextView)findViewById(Riditem); String item = getintent()getstringextra("item"); textviewsettext(item); Remarques : Les informations qui proviennent de l Itent sont conservées lorsque le système met en hibernation l activité ; Ces informations peuvent donc être utilisées à chaque exécution de la méthode oncreate Bertrand Estellon (AMU) Android Master CCI March 23, / 266
21 Intentions Bertrand Estellon (AMU) Android Master CCI March 23, / 266
22 public class MainActivity extends ListActivity { private ArrayAdapter<String> adapter; private ArrayList<String> list; protected void oncreate(bundle savedinstancestate) { superoncreate(savedinstancestate); list = new ArrayList<String>(); adapter = new ArrayAdapter<String>(this, androidrlayoutsimple_list_item_1, list); setlistadapter(adapter); public boolean oncreateoptionsmenu(menu menu) { MenuInflater inflater = new MenuInflater(this); inflaterinflate(rmenumain, menu); return superonprepareoptionsmenu(menu); public void onadditemaction(menuitem menuitem) { /* */ Bertrand Estellon (AMU) Android Master CCI March 23, / 266
23 La description du menu : <menu xmlns:android=" > <item android:orderincategory="100" android:showasaction="always" android:onclick="onadditemaction" android:title="@string/add"/> </menu> La callback associée à l item du menu : public class MainActivity extends ListActivity { /* */ public void onadditemaction(menuitem menuitem) { /* */ Bertrand Estellon (AMU) Android Master CCI March 23, / 266
24 Exécution d une activité avec attente de réponse : public class MainActivity extends ListActivity { final int ADD_ITEM_ACTIVITY = 0; public void onadditemaction(menuitem menuitem) { Intent intent = new Intent(this, AddItemActivityclass); startactivityforresult(intent, protected void onactivityresult(int requestcode, int resultcode, Intent data) { if (requestcode!= ADD_ITEM_ACTIVITY) return; /* TODO : récupérer l'élement dans la variable item */ adapteradd(item); Bertrand Estellon (AMU) Android Master CCI March 23, / 266
25 Définition du layout de la seconde activité : <LinearLayout xmlns:android="" android:orientation="horizontal" > <EditText android:id="@+id/item" android:inputtype="text" /> <Button android:onclick="additem" /> <Button android:onclick="cancel" /> </LinearLayout> Bertrand Estellon (AMU) Android Master CCI March 23, / 266
26 Définition de la seconde activité : public class AddItemActivity extends Activity { private EditText edittext; protected void oncreate(bundle savedinstancestate) { superoncreate(savedinstancestate); setcontentview(rlayoutactivity_add_item); edittext = (EditText)findViewById(Riditem); public void additem(view v) { Intent intent = new Intent(); intentputextra("item", edittextgettext()tostring()); setresult(result_ok, intent); finish(); public void cancel(view v) { setresult(result_canceled); finish(); Bertrand Estellon (AMU) Android Master CCI March 23, / 266
27 Récupération du résultat dans l activité principale : public class MainActivity extends ListActivity { final int ADD_ITEM_ACTIVITY = 0; /* protected void onactivityresult(int requestcode, int resultcode, sintent data) { if (requestcode!= ADD_ITEM_ACTIVITY) return; if (resultcode!= RESULT_OK) return; String item = datagetstringextra("item"); adapteradd(item); Bertrand Estellon (AMU) Android Master CCI March 23, / 266
28 Gestion du cycle de vie de l activité principale : public class MainActivity extends ListActivity { private ArrayAdapter<String> adapter; private ArrayList<String> list; protected void oncreate(bundle savedinstancestate) { superoncreate(savedinstancestate); if (savedinstancestate!= null) list = savedinstancestategetstringarraylist("list"); else list = new ArrayList<String>(); /* */ protected void onsaveinstancestate(bundle outstate) { superonsaveinstancestate(outstate); outstateputstringarraylist("list", list); /* */ Bertrand Estellon (AMU) Android Master CCI March 23, / 266
29 Intentions Répondre à des intentions Bertrand Estellon (AMU) Android Master CCI March 23, / 266
30 Répondre à des intentions Ajout d un intent-filter dans le manifeste de l application : <?xml version="10" encoding="utf-8"?> <manifest xmlns:android="" > <application> <activity android:name="comexampletestbrowseractivity" android:label="@string/app_name" > <intent-filter> <action android:name="androidintentactionview" /> <category android:name="androidintentcategorydefault" /> <data android:scheme="http"/> </intent-filter> </activity> </application> </manifest> Bertrand Estellon (AMU) Android Master CCI March 23, / 266
31 Répondre à des intentions Le layout de l activité : <FrameLayout xmlns:android="" android:layout_width="match_parent" android:layout_height="match_parent" > <WebView android:id="@+id/webview" android:layout_width="match_parent" android:layout_height="match_parent" /> </FrameLayout> Bertrand Estellon (AMU) Android Master CCI March 23, / 266
32 Répondre à des intentions Le code de l activité : public class BrowserActivity extends Activity { private WebView webview; protected void oncreate(bundle savedinstancestate) { superoncreate(savedinstancestate); setcontentview(rlayoutactivity_main); webview = (WebView) findviewbyid(ridwebview); webviewloadurl(getintent()getdata()tostring()); webviewsetwebviewclient(new WebViewClient()); private class WebViewClient extends androidwebkitwebviewclient { public boolean shouldoverrideurlloading(webview view, String url) { viewloadurl(url); return true; Bertrand Estellon (AMU) Android Master CCI March 23, / 266
Workshop. 1. Create a simple Intent (Page 1 2) Launch a Camera for Photo Taking
Workshop 1. Create a simple Intent (Page 1 2) Launch a Camera for Photo Taking 2. Create Intent with Parsing Data (Page 3 8) Making Phone Call and Dial Access Web Content Playing YouTube Video 3. Create
More informationIntents. Your first app assignment
Intents Your first app assignment We will make this. Decidedly lackluster. Java Code Java Code XML XML Preview XML Java Code Java Code XML Buttons that work
More informationAndroid Apps Development for Mobile and Tablet Device (Level I) Lesson 4. Workshop
Workshop 1. Create an Option Menu, and convert it into Action Bar (Page 1 8) Create an simple Option Menu Convert Option Menu into Action Bar Create Event Listener for Menu and Action Bar Add System Icon
More informationAction Bar. (c) 2010 Haim Michael. All Rights Reserv ed.
Action Bar Introduction The Action Bar is a widget that is shown on top of the screen. It includes the application logo on its left side together with items available from the options menu on the right.
More informationFragment Example Create the following files and test the application on emulator or device.
Fragment Example Create the following files and test the application on emulator or device. File: AndroidManifest.xml
More informationAccelerating Information Technology Innovation
Accelerating Information Technology Innovation http://aiti.mit.edu India Summer 2012 Review Session Android and Web Working with Views Working with Views Create a new Android project. The app name should
More informationMAD ASSIGNMENT NO 2. Submitted by: Rehan Asghar BSSE AUGUST 25, SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept.
MAD ASSIGNMENT NO 2 Submitted by: Rehan Asghar BSSE 7 15126 AUGUST 25, 2017 SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept. Android Widgets There are given a lot of android widgets with simplified
More informationAndroid Programs Day 5
Android Programs Day 5 //Android Program to demonstrate the working of Options Menu. 1. Create a New Project. 2. Write the necessary codes in the MainActivity.java to create OptionMenu. 3. Add the oncreateoptionsmenu()
More informationOur First Android Application
Mobile Application Development Lecture 04 Imran Ihsan Our First Android Application Even though the HelloWorld program is trivial in introduces a wealth of new ideas the framework, activities, manifest,
More information05. RecyclerView and Styles
05. RecyclerView and Styles 08.03.2018 1 Agenda Intents Creating Lists with RecyclerView Creating Cards with CardView Application Bar Menu Styles and Themes 2 Intents 3 What is Intent? An Intent is an
More informationProgramming with Android: Introduction. Layouts. Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna
Programming with Android: Introduction Layouts Luca Bedogni Marco Di Felice Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna Views: outline Main difference between a Drawable and
More informationProduced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar
Mobile Application Development Higher Diploma in Science in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology
More informationProduced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar
Mobile Application Development Higher Diploma in Science in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology
More informationCreate Parent Activity and pass its information to Child Activity using Intents.
Create Parent Activity and pass its information to Child Activity using Intents. /* MainActivity.java */ package com.example.first; import android.os.bundle; import android.app.activity; import android.view.menu;
More informationMobile Application Development Android
Mobile Application Development Android Lecture 2 MTAT.03.262 Satish Srirama satish.srirama@ut.ee Android Lecture 1 -recap What is Android How to develop Android applications Run & debug the applications
More informationAndroid. Mobile operating system developed by Google A complete stack. Based on the Linux kernel Open source under the Apache 2 license
Android Android Mobile operating system developed by Google A complete stack OS, framework A rich set of applications Email, calendar, browser, maps, text messaging, contacts, camera, dialer, music player,
More informationEMBEDDED SYSTEMS PROGRAMMING Application Tip: Managing Screen Orientation
EMBEDDED SYSTEMS PROGRAMMING 2016-17 Application Tip: Managing Screen Orientation ORIENTATIONS Portrait Landscape Reverse portrait Reverse landscape ON REVERSE PORTRAIT Android: all four orientations are
More informationStarting Another Activity Preferences
Starting Another Activity Preferences Android Application Development Training Xorsat Pvt. Ltd www.xorsat.net fb.com/xorsat.education Outline Starting Another Activity Respond to the Button Create the
More informationMobile Programming Lecture 5. Composite Views, Activities, Intents and Filters
Mobile Programming Lecture 5 Composite Views, Activities, Intents and Filters Lecture 4 Review How do you get the value of a string in the strings.xml file? What are the steps to populate a Spinner or
More informationMobila applikationer och trådlösa nät, HI1033, HT2013
Mobila applikationer och trådlösa nät, HI1033, HT2013 Today: - User Interface basics - View components - Event driven applications and callbacks - Menu and Context Menu - ListView and Adapters - Android
More informationMAD ASSIGNMENT NO 3. Submitted by: Rehan Asghar BSSE AUGUST 25, SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept.
MAD ASSIGNMENT NO 3 Submitted by: Rehan Asghar BSSE 7 15126 AUGUST 25, 2017 SUBMITTED TO: SIR WAQAS ASGHAR Superior CS&IT Dept. MainActivity.java File package com.example.tutorialspoint; import android.manifest;
More informationBasic UI elements: Android Buttons (Basics) Marco Ronchetti Università degli Studi di Trento
Basic UI elements: Android Buttons (Basics) Marco Ronchetti Università degli Studi di Trento Let s work with the listener Button button = ; button.setonclicklistener(new.onclicklistener() { public void
More information1. Simple List. 1.1 Simple List using simple_list_item_1
1. Simple List 1.1 Simple List using simple_list_item_1 1. Create the Android application with the following attributes. Application Name: MySimpleList Project Name: Package Name: MySimpleList com.example.mysimplelist
More informationAction Bar. Action bar: Top navigation bar at each screen The action bar is split into four different functional areas that apply to most apps.
1 Action Bar Action bar: Top navigation bar at each screen The action bar is split into four different functional areas that apply to most apps. 1) App Icon 3) Action Buttons 2)View Control 4) Action Overflows
More informationAndroid Apps Development for Mobile and Tablet Device (Level I) Lesson 2
Workshop 1. Compare different layout by using Change Layout button (Page 1 5) Relative Layout Linear Layout (Horizontal) Linear Layout (Vertical) Frame Layout 2. Revision on basic programming skill - control
More informationEMBEDDED SYSTEMS PROGRAMMING Application Tip: Saving State
EMBEDDED SYSTEMS PROGRAMMING 2016-17 Application Tip: Saving State THE PROBLEM How to save the state (of a UI, for instance) so that it survives even when the application is closed/killed The state should
More informationIslamic University of Gaza. Faculty of Engineering. Computer Engineering Department. Mobile Computing ECOM Eng. Wafaa Audah.
Islamic University of Gaza Faculty of Engineering Computer Engineering Department Mobile Computing ECOM 5341 By Eng. Wafaa Audah July 2013 1 Launch activitits, implicit intents, data passing & start activity
More informationAndroid Application Development. By : Shibaji Debnath
Android Application Development By : Shibaji Debnath About Me I have over 10 years experience in IT Industry. I have started my career as Java Software Developer. I worked in various multinational company.
More informationCreating a Custom ListView
Creating a Custom ListView References https://developer.android.com/guide/topics/ui/declaring-layout.html#adapterviews Overview The ListView in the previous tutorial creates a TextView object for each
More informationActionBar. import android.support.v7.app.actionbaractivity; public class MyAppBarActivity extends ActionBarActivity { }
Android ActionBar import android.support.v7.app.actionbaractivity; public class MyAppBarActivity extends ActionBarActivity { Layout, activity.xml
More informationTablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time
Tablets have larger displays than phones do They can support multiple UI panes / user behaviors at the same time The 1 activity 1 thing the user can do heuristic may not make sense for larger devices Application
More information10.1 Introduction. Higher Level Processing. Word Recogniton Model. Text Output. Voice Signals. Spoken Words. Syntax, Semantics, Pragmatics
Chapter 10 Speech Recognition 10.1 Introduction Speech recognition (SR) by machine, which translates spoken words into text has been a goal of research for more than six decades. It is also known as automatic
More informationTabel mysql. Kode di PHP. Config.php. Service.php
Tabel mysql Kode di PHP Config.php Service.php Layout Kode di Main Activity package com.example.mini.webandroid; import android.app.progressdialog; import android.os.asynctask; import android.support.v7.app.appcompatactivity;
More informationAgenda. Overview of Xamarin and Xamarin.Android Xamarin.Android fundamentals Creating a detail screen
Gill Cleeren Agenda Overview of Xamarin and Xamarin.Android Xamarin.Android fundamentals Creating a detail screen Lists and navigation Navigating from master to detail Optimizing the application Preparing
More informationApplied Cognitive Computing Fall 2016 Android Application + IBM Bluemix (Cloudant NoSQL DB)
Applied Cognitive Computing Fall 2016 Android Application + IBM Bluemix (Cloudant NoSQL DB) In this exercise, we will create a simple Android application that uses IBM Bluemix Cloudant NoSQL DB. The application
More informationDiving into Android. By Jeroen Tietema. Jeroen Tietema,
Diving into Android By Jeroen Tietema Jeroen Tietema, 2015 1 Requirements 4 Android SDK 1 4 Android Studio (or your IDE / editor of choice) 4 Emulator (Genymotion) or a real device. 1 See https://developer.android.com
More informationLecture 14. Android Application Development
Lecture 14 Android Application Development Notification Instructor Muhammad Owais muhammad.owais@riphah.edu.pk Cell: 03215500223 Notifications Used to notify user for events Three general forms of Notifications
More informationAndroid Application Model I. CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr.
Android Application Model I CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr. Rajiv Ramnath 1 Framework Support (e.g. Android) 2 Framework Capabilities
More informationMobile Computing Practice # 2c Android Applications - Interface
Mobile Computing Practice # 2c Android Applications - Interface One more step in the restaurants application. 1. Design an alternative layout for showing up in landscape mode. Our current layout is not
More informationProduced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar
Mobile Application Development Higher Diploma in Science in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology
More informationPractical 1.ListView example
Practical 1.ListView example In this example, we show you how to display a list of fruit name via ListView. Android Layout file File : res/layout/list_fruit.xml
More informationEMBEDDED SYSTEMS PROGRAMMING UI Specification: Approaches
EMBEDDED SYSTEMS PROGRAMMING 2016-17 UI Specification: Approaches UIS: APPROACHES Programmatic approach: UI elements are created inside the application code Declarative approach: UI elements are listed
More informationOverview. What are layouts Creating and using layouts Common layouts and examples Layout parameters Types of views Event listeners
Layouts and Views http://developer.android.com/guide/topics/ui/declaring-layout.html http://developer.android.com/reference/android/view/view.html Repo: https://github.com/karlmorris/viewsandlayouts Overview
More informationChapter 5 Flashing Neon FrameLayout
5.1 Case Overview This case mainly introduced the usages of FrameLayout; we can use FrameLayout to realize the effect, the superposition of multiple widgets. This example is combined with Timer and Handler
More informationAdapter.
1 Adapter An Adapter object acts as a bridge between an AdapterView and the underlying data for that view The Adapter provides access to the data items The Adapter is also responsible for making a View
More informationOverview. Lecture: Implicit Calling via Share Implicit Receiving via Share Launch Telephone Launch Settings Homework
Implicit Intents Overview Lecture: Implicit Calling via Share Implicit Receiving via Share Launch Telephone Launch Settings Homework Intents Intent asynchronous message used to activate one Android component
More informationMobile Application Development Lab [] Simple Android Application for Native Calculator. To develop a Simple Android Application for Native Calculator.
Simple Android Application for Native Calculator Aim: To develop a Simple Android Application for Native Calculator. Procedure: Creating a New project: Open Android Stdio and then click on File -> New
More informationFragments. Lecture 11
Fragments Lecture 11 Situational layouts Your app can use different layouts in different situations Different device type (tablet vs. phone vs. watch) Different screen size Different orientation (portrait
More informationArrays of Buttons. Inside Android
Arrays of Buttons Inside Android The Complete Code Listing. Be careful about cutting and pasting.
More informationAndroid Application Model I
Android Application Model I CSE 5236: Mobile Application Development Instructor: Adam C. Champion, Ph.D. Course Coordinator: Dr. Rajiv Ramnath Reading: Big Nerd Ranch Guide, Chapters 3, 5 (Activities);
More informationCMSC436: Fall 2013 Week 3 Lab
CMSC436: Fall 2013 Week 3 Lab Objectives: Familiarize yourself with the Activity class, the Activity lifecycle, and the Android reconfiguration process. Create and monitor a simple application to observe
More informationDynamically Create Admob Banner and Interstitial Ads
Dynamically Create Admob Banner and Interstitial Ads activity_main.xml file 0 0 0
More informationMeniu. Create a project:
Meniu Create a project: Project name: P0131_MenuSimple Build Target: Android 2.3.3 Application name: MenuSimple Package name: ru.startandroid.develop.menusimple Create Activity: MainActivity Open MainActivity.java.
More informationOpen Lecture Mobile Programming. Intro to Material Design
Open Lecture Mobile Programming Intro to Material Design Agenda Introduction to Material Design Applying a Material Theme Toolbar/Action Bar Navigation Drawer RecyclerView CardView Support Design Widgets/Tools
More informationCS 193A. Multiple Activities and Intents
CS 193A Multiple Activities and Intents This document is copyright (C) Marty Stepp and Stanford Computer Science. Licensed under Creative Commons Attribution 2.5 License. All rights reserved. Multiple
More informationMobile Application Development MyRent Settings
Mobile Application Development MyRent Settings Waterford Institute of Technology October 13, 2016 John Fitzgerald Waterford Institute of Technology, Mobile Application Development MyRent Settings 1/19
More informationExternal Services. CSE 5236: Mobile Application Development Course Coordinator: Dr. Rajiv Ramnath Instructor: Adam C. Champion
External Services CSE 5236: Mobile Application Development Course Coordinator: Dr. Rajiv Ramnath Instructor: Adam C. Champion 1 External Services Viewing websites Location- and map-based functionality
More informationUser Interface Design & Development
User Interface Design & Development Lecture Intro to Android João Pedro Sousa SWE 632, Fall 2011 George Mason University features multitasking w/ just-in-time compiler for Dalvik-VM bytecode storage on
More informationELET4133: 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 informationCOMP4521 EMBEDDED SYSTEMS SOFTWARE
COMP4521 EMBEDDED SYSTEMS SOFTWARE LAB 5: USING WEBVIEW AND USING THE NETWORK INTRODUCTION In this lab we modify the application we created in the first three labs. Instead of using the default browser,
More informationEMBEDDED SYSTEMS PROGRAMMING Application Tip: Switching UIs
EMBEDDED SYSTEMS PROGRAMMING 2015-16 Application Tip: Switching UIs THE PROBLEM How to switch from one UI to another Each UI is associated with a distinct class that controls it Solution shown: two UIs,
More informationSolving an Android Threading Problem
Home Java News Brief Archive OCI Educational Services Solving an Android Threading Problem Introduction by Eric M. Burke, Principal Software Engineer Object Computing, Inc. (OCI) By now, you probably know
More informationGraphical User Interfaces
Graphical User Interfaces Some suggestions Avoid displaying too many things Well-known anti-patterns Display useful content on your start screen Use action bars to provide consistent navigation Keep your
More informationVLANs. Commutation LAN et Wireless Chapitre 3
VLANs Commutation LAN et Wireless Chapitre 3 ITE I Chapter 6 2006 Cisco Systems, Inc. All rights reserved. Cisco Public 1 Objectifs Expliquer le rôle des VLANs dans un réseau convergent. Expliquer le rôle
More informationCSE 660 Lab 3 Khoi Pham Thanh Ho April 19 th, 2015
CSE 660 Lab 3 Khoi Pham Thanh Ho April 19 th, 2015 Comment and Evaluation: This lab introduces us about Android SDK and how to write a program for Android platform. The calculator is pretty easy, everything
More informationSoftware Practice 3 Today s lecture Today s Task Porting Android App. in real device
1 Software Practice 3 Today s lecture Today s Task Porting Android App. in real device Prof. Hwansoo Han T.A. Jeonghwan Park 43 INTENT 2 3 Android Intent An abstract description of a message Request actions
More informationStoppUhr. <Button android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="start1"
StoppUhr
More informationTime Picker trong Android
Time Picker trong Android Time Picker trong Android cho phép bạn lựa chọn thời gian của ngày trong chế độ hoặc 24 h hoặc AM/PM. Thời gian bao gồm các định dạng hour, minute, và clock. Android cung cấp
More informationVienos veiklos būsena. Theory
Vienos veiklos būsena Theory While application is running, we create new Activities and close old ones, hide the application and open it again and so on, and Activity can process all these events. It is
More informationMobile Computing Fragments
Fragments APM@FEUP 1 Fragments (1) Activities are used to define a full screen interface and its functionality That s right for small screen devices (smartphones) In bigger devices we can have more interface
More informationGetting Started. Dr. Miguel A. Labrador Department of Computer Science & Engineering
Getting Started Dr. Miguel A. Labrador Department of Computer Science & Engineering labrador@csee.usf.edu http://www.csee.usf.edu/~labrador 1 Goals Setting up your development environment Android Framework
More informationANDROID PROGRAMS DAY 3
ANDROID PROGRAMS DAY 3 //Android project to navigate from first page to second page using Intent Step 1: Create a new project Step 2: Enter necessary details while creating project. Step 3: Drag and drop
More informationANDROID USER INTERFACE
1 ANDROID USER INTERFACE Views FUNDAMENTAL UI DESIGN Visual interface element (controls or widgets) ViewGroup Contains multiple widgets. Layouts inherit the ViewGroup class Activities Screen being displayed
More informationGUI Widget. Lecture6
GUI Widget Lecture6 AnalogClock/Digital Clock Button CheckBox DatePicker EditText Gallery ImageView/Button MapView ProgressBar RadioButton Spinner TextView TimePicker WebView Android Widgets Designing
More informationMobile Development Lecture 8: Intents and Animation
Mobile Development Lecture 8: Intents and Animation Mahmoud El-Gayyar elgayyar@ci.suez.edu.eg Elgayyar.weebly.com 1. Multiple Activities Intents Multiple Activities Many apps have multiple activities.
More informationAndroid App Development. Mr. Michaud ICE Programs Georgia Institute of Technology
Android App Development Mr. Michaud ICE Programs Georgia Institute of Technology Android Operating System Created by Android, Inc. Bought by Google in 2005. First Android Device released in 2008 Based
More informationEMBEDDED SYSTEMS PROGRAMMING Android Services
EMBEDDED SYSTEMS PROGRAMMING 2016-17 Android Services APP COMPONENTS Activity: a single screen with a user interface Broadcast receiver: responds to system-wide broadcast events. No user interface Service:
More informationIntents. 18 December 2018 Lecture Dec 2018 SE 435: Development in the Android Environment 1
Intents 18 December 2018 Lecture 4 18 Dec 2018 SE 435: Development in the Android Environment 1 Topics for Today Building an Intent Explicit Implicit Other features: Data Result Sources: developer.android.com
More informationDatabase Development In Android Applications
ITU- FAO- DOA- TRCSL Training on Innovation & Application Development for E- Agriculture Database Development In Android Applications 11 th - 15 th December 2017 Peradeniya, Sri Lanka Shahryar Khan & Imran
More informationProgramming with Android: Activities and Intents. Dipartimento di Informatica Scienza e Ingegneria Università di Bologna
Programming with Android: Activities and Intents Luca Bedogni Marco Di Felice Dipartimento di Informatica Scienza e Ingegneria Università di Bologna Outline What is an intent? Intent description Handling
More informationCS 4330/5390: Mobile Application Development Exam 1
1 Spring 2017 (Thursday, March 9) Name: CS 4330/5390: Mobile Application Development Exam 1 This test has 8 questions and pages numbered 1 through 7. Reminders This test is closed-notes and closed-book.
More informationActivities and Fragments
Activities and Fragments 21 November 2017 Lecture 5 21 Nov 2017 SE 435: Development in the Android Environment 1 Topics for Today Activities UI Design and handlers Fragments Source: developer.android.com
More informationListView Containers. Resources. Creating a ListView
ListView Containers Resources https://developer.android.com/guide/topics/ui/layout/listview.html https://developer.android.com/reference/android/widget/listview.html Creating a ListView A ListView is a
More informationUpon completion of the second part of the lab the students will have:
ETSN05, Fall 2017, Version 2.0 Software Development of Large Systems Lab 2 1. INTRODUCTION The goal of lab 2 is to introduce students to the basics of Android development and help them to create a starting
More informationMobila applikationer och trådlösa nät, HI1033, HT2012
Mobila applikationer och trådlösa nät, HI1033, HT2012 Today: - User Interface basics - View components - Event driven applications and callbacks - Menu and Context Menu - ListView and Adapters - Android
More informationAPI Guide for Gesture Recognition Engine. Version 2.0
API Guide for Gesture Recognition Engine Version 2.0 Table of Contents Gesture Recognition API... 3 API URI... 3 Communication Protocol... 3 Getting Started... 4 Protobuf... 4 WebSocket Library... 4 Project
More informationProduced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar
Mobile Application Development Higher Diploma in Science in Computer Science Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology
More information<uses-permission android:name="android.permission.internet"/>
Chapter 11 Playing Video 11.1 Introduction We have discussed how to play audio in Chapter 9 using the class MediaPlayer. This class can also play video clips. In fact, the Android multimedia framework
More informationMobile and Ubiquitous Computing: Android Programming (part 3)
Mobile and Ubiquitous Computing: Android Programming (part 3) Master studies, Winter 2015/2016 Dr Veljko Pejović Veljko.Pejovic@fri.uni-lj.si Based on Programming Handheld Systems, Adam Porter, University
More informationNotification mechanism
Notification mechanism Adaptation of materials: dr Tomasz Xięski. Based on presentations made available by Victor Matos, Cleveland State University. Portions of this page are reproduced from work created
More informationMobile Programming Lecture 3. Resources, Selection, Activities, Intents
Mobile Programming Lecture 3 Resources, Selection, Activities, Intents Lecture 2 Review What widget would you use to allow the user to enter a yes/no value a range of values from 1 to 100 What's the benefit
More informationSouth Africa
South Africa 2013 Lecture 6: Layouts, Menus, Views http://aiti.mit.edu Create an Android Virtual Device Click the AVD Icon: Window -> AVD Manager -> New Name & start the virtual device (this may take a
More informationUsing Intents to Launch Activities
Using Intents to Launch Activities The most common use of Intents is to bind your application components. Intents are used to start, stop, and transition between the Activities within an application. The
More informationManifest.xml. Activity.java
Dr.K.Somasundaram Ph.D Professor Department of Computer Science and Applications Gandhigram Rural Institute, Gandhigram, Tamil Nadu-624302, India ka.somasundaram@gmail.com Manifest.xml
More informationIntents, Intent Filters, and Invoking Activities: Part I: Using Class Name
2012 Marty Hall Intents, Intent Filters, and Invoking Activities: Part I: Using Class Name Originals of Slides and Source Code for Examples: http://www.coreservlets.com/android-tutorial/ Customized Java
More informationAndroid UI Development
Android UI Development Android UI Studio Widget Layout Android UI 1 Building Applications A typical application will include: Activities - MainActivity as your entry point - Possibly other activities (corresponding
More informationProgramming with Android: Intents. Luca Bedogni. Dipartimento di Scienze dell Informazione Università di Bologna
Programming with Android: Intents Luca Bedogni Dipartimento di Scienze dell Informazione Università di Bologna Outline What is an intent? Intent description Handling Explicit Intents Handling implicit
More informationPENGEMBANGAN APLIKASI PERANGKAT BERGERAK (MOBILE)
PENGEMBANGAN APLIKASI PERANGKAT BERGERAK (MOBILE) Network Connection Web Service K Candra Brata andra.course@gmail.com Mobille App Lab 2015-2016 Network Connection http://developer.android.com/training/basics/network-ops/connecting.html
More information1. Location Services. 1.1 GPS Location. 1. Create the Android application with the following attributes. Application Name: MyLocation
1. Location Services 1.1 GPS Location 1. Create the Android application with the following attributes. Application Name: MyLocation Project Name: Package Name: MyLocation com.example.mylocation 2. Put
More information