Android on Intel Course App Development - Advanced



Similar documents
Beginner s Android Development Tutorial!

Android Application Development

Here to take you beyond Mobile Application development using Android Course details

Using Extensions or Cordova Plugins in your RhoMobile Application Darryn

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

Graduate presentation for CSCI By Janakiram Vantipalli ( Janakiram.vantipalli@colorado.edu )

TomTom PRO 82xx PRO.connect developer guide

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

Intel Do-It-Yourself Challenge Lab 2: Intel Galileo s Linux side Nicolas Vailliet

Android Tutorial. Larry Walters OOSE Fall 2011

UNIVERSITY AUTHORISED EDUCATION PARTNER (WDP)

06 Team Project: Android Development Crash Course; Project Introduction

Table of Contents. Adding Build Targets to the SDK 8 The Android Developer Tools (ADT) Plug-in for Eclipse 9

Android Development Tutorial. Nikhil Yadav CSE40816/ Pervasive Health Fall 2011

ITG Software Engineering

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

Mobile Security - Tutorial 1. Beginning Advanced Android Development Brian Ricks Fall 2014

Android Application Development Distance Learning Program Brochure

Developing NFC Applications on the Android Platform. The Definitive Resource

Programming Mobile Applications with Android

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

Mocean Android SDK Developer Guide

Open Source Telemedicine Android Client Development Introduction

ELET4133: Embedded Systems. Topic 15 Sensors

How to develop your own app

Introduction to Android Programming (CS5248 Fall 2015)

Getting started with Android and App Engine

Android For Java Developers. Marko Gargenta Marakana

Beginning Android Programming

Introduction to Android. CSG250 Wireless Networks Fall, 2008

SDK Code Examples Version 2.4.2

Android Application Development: Hands- On. Dr. Jogesh K. Muppala

1. Introduction to Android

Mobile App Sensor Documentation (English Version)

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

Android Development. 吳 俊 興 國 立 高 雄 大 學 資 訊 工 程 學 系

The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.

Mobile App Design and Development

Mobile Application Development 2014

Android Development. Marc Mc Loughlin

Introduction to Android Development. Jeff Avery CS349, Mar 2013

HTTPS hg clone plugin library SSH hg clone plugin library

simplify printing TX Guide v. 1. make IT simple Tricerat, Inc Cronridge Drive Suite 100 Owings Mills, MD , All rights Reserved

Università Degli Studi di Parma. Distributed Systems Group. Android Development. Lecture 1 Android SDK & Development Environment. Marco Picone

ECM (ELO-KIT-ECMG2-AND)

How To Develop Android On Your Computer Or Tablet Or Phone

Basics of Android Development 1

Lab 1 (Reading Sensors & The Android API) Week 3

Frameworks & Android. Programmeertechnieken, Tim Cocx

Developer's Cookbook. Building Applications with. The Android. the Android SDK. A Addison-Wesley. James Steele Nelson To

ID TECH UniMag Android SDK User Manual

Login with Amazon Getting Started Guide for Android. Version 2.0

Developing Eclipse Plug-ins* Learning Objectives. Any Eclipse product is composed of plug-ins

OpenCV on Android Platforms

Android Environment SDK

Understanding class paths in Java EE projects with Rational Application Developer Version 8.0

Getting Started: Creating a Simple App

Introduction to NaviGenie SDK Client API for Android

Android Application Development

l What is Android? l Getting Started l The Emulator l Hello World l ADB l Text to Speech l Other APIs (camera, bitmap, etc)

Introduction to Android: Hello, Android! 26 Mar 2010 CMPT166 Dr. Sean Ho Trinity Western University

ANDROID INTRODUCTION TO ANDROID

PubMatic Android SDK. Developer Guide. For Android SDK Version 4.3.5

A Case Study of an Android* Client App Using Cloud-Based Alert Service

SDK Quick Start Guide

Programming with Android: SDK install and initial setup. Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna

Final Year Project Interim Report

Tutorial: Setup for Android Development

directory to "d:\myproject\android". Hereafter, I shall denote the android installed directory as

«compl*tc IDIOT'S GUIDE. Android App. Development. by Christopher Froehlich ALPHA. A member of Penguin Group (USA) Inc.

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

System Reference 2013

Praktikum Entwicklung Mediensysteme (für Master)

Pentesting Android Apps. Sneha Rajguru

Tizen Compliance Test (TCT) Hojun Jaygarl (Samsung Electronics), Cathy Shen (Intel)

PHA Android Application Development

ECE 455/555 Embedded System Design. Android Programming. Wei Gao. Fall

COURSE CONTENT. GETTING STARTED Select Android Version Create RUN Configuration Create Your First Android Activity List of basic sample programs

Android Development. Lecture AD 0 Android SDK & Development Environment. Università degli Studi di Parma. Mobile Application Development

Iotivity Programmer s Guide Soft Sensor Manager for Android

Tutorial on Basic Android Setup

Android Application Development - Exam Sample

AppUse - Android Pentest Platform Unified

ANDROID PROGRAMMING - INTRODUCTION. Roberto Beraldi

Windows Mail POP Instructions - Bloomsburg University Students

Arduino & Android. A How to on interfacing these two devices. Bryant Tram

An Easy-to-Use Mobile App for Personal Buy and Sell Intermediate Project Report

Developing In Eclipse, with ADT

Running a Program on an AVD

Introduction to Android

Android Geek Night. Application framework

Basic Android Setup Windows Version

Transcription:

Android on Intel Course App Development - Advanced Paul Guermonprez www.intel-software-academic-program.com paul.guermonprez@intel.com Intel Software 2013-02-08

Persistence

Preferences Shared preference can be used to remember basic information (string, integer, boolean, etc). It is easy to use. To save data, you need to retrieve the SharedPreference object editor.

Preferences Here is how to save data. And here is how to load data.

Instance State When your application is put onpause, the method onsaveinstancestate is called. If you don't want to loose data, you can save them.

SQLite SQLite is a light database that you can use to persist your application's data You can use SQLite in Java and the library is already integrated in Android framework.

JSON JSON is an open standard that can be used to send/receive information. Google-gson is a free library that allows to serialize/deserialize java objects Download google gson on https://code.google.com/p/google-gson/

JSON Unzip the file anywhere you want but put the jar file in the libs folder of your Android* project Add the jar file to your classpath Here is a snippet of Java code

JSON And the result is a JSON string. You can use this string in a HTTP request for example. In most of the applications, using the shared preference system is enough and you don't need to use a SQL database.

Background process

AsyncTask You can't block the UI thread more than few seconds or the application will crash But you sometimes need more than few seconds to process your data You can create a thread but... you can't refresh UI from the non UI thread

AsyncTask AsyncTask can process data on a different thread than the UI thread. They can also refresh the UI (ProgressBar for example)

AsyncTask Create an inner class that inherits from AsyncTask

AsyncTask In Android* you can also use the Java threads but remember that if you want to update the UI during your background process, the AsyncTask offers an elegant solution.

Sensors

Sensors To retrieve a sensor, you need to use the SensorManager Then you can get the sensor You also need to implement a SensorEventListener

Sensors Then you must register your sensor. A good location is in the OnResume function. Don't forget to unregister your listener in the OnPause function.

Sensors full code Using the sensors is simple with Android*. The Sensor interface allows to manipulate any kind of sensor.

NFC When your phone detect a NFC Tag, Android* tries to launch an application that can read it. You can declare specific intent-filter in the manifest to inform Android that your application can read NDEF tags In this example, our application will be launched when the tag contains a http link.

NFC Here is the Java implementation

NFC In the Java side, you can check that your application can really handle the intent. Then you can retrieve the TAG We saw how to use NFC with Android* Intents but it is also possible to read NFC tags in a running application.

Good to know

Resources It is often a good practice to separate implementations details like text strings or graphical element sizes from the code or user interface definitions. To do so, use resources. From the code : Resources res = getresources(); CharSequence resmsg = res.gettext(r.string.message); It is also possible to reference resources from other resources, or access system resources.

Localization It's easy to make your app multilingual if you start using resources from the beginning. You already have a res/values/strings.xml file. All you need to do is create res/values-xx/strings.xml files where XX is the language-region code.

Note : Logs Using the Android* log system is really important when you develop your application. You can configure Eclipse* to display only a subset of the logs. First, you need to display the Logcat (Windows Show View Other...) In the search tool, type logcat.

Note : Logs Then you can add a new channel Tag name used to filter your logs

Note : Logs In your java code And here is the result You can select the log priority Log.d: For debug messages Log.e: For error messages Log.i: For information messages Log.v: For verbose messages Log.w: For warning messages

License Creative Commons - By 3.0 You are free: to Share to copy, distribute and transmit the work to Remix to adapt the work to make commercial use of the work Under the following conditions: Attribution You must attribute the work in the manner specified by the author or licensor (but not in any way that suggests that they endorse you or your use of the work). With the understanding that: Waiver Any of the above conditions can be waived if you get permission from the copyright holder. Public Domain Where the work or any of its elements is in the public domain under applicable law, that status is in no way affected by the license. Other Rights In no way are any of the following rights affected by the license: Your fair dealing or fair use rights, or other applicable copyright exceptions and limitations; The author's moral rights; Rights other persons may have either in the work itself or in how the work is used, such as publicity or privacy rights. Notice For any reuse or distribution, you must make clear to others the license terms of this work. The best way to do this is with a link to this web page. http://creativecommons.org/licenses/by/3.0/