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

Size: px
Start display at page:

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

Transcription

1 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

2 Objective Data Storage Shared Preferences Data Files Two design papers Case Studies (1-6) Presenter: Tony Chiou Case Studies (7-13) Presenter: Ashok Kumar Page 2 Fall 2011 CS 495/595 - App Development for Smart Devices

3 Saving data Your options (most complex apps use all) Shared Preferences Bundles Local files Local database (SQLite) Remote database Saving data obviously essential Page 3 Fall 2011 CS 495/595 - App Development for Smart Devices

4 Saving UI state Activity should save its user interface state each time it moves to the background Required due to OS killing processes Even if you think your app will be in the foreground all the time, you need to do this, because of... Phone calls Other apps The nature of mobile use Page 4 Fall 2011 CS 495/595 - App Development for Smart Devices

5 Saving other info Application preferences UI selections Data entry Page 5 Fall 2011 CS 495/595 - App Development for Smart Devices

6 Shared Preferences Page 6 Spring 2011 CS 752/852 - Wireless and Mobile Networking

7 Shared Preferences Simple, lightweight key/value pair (or name/value pair NVP) mechanism Support primitive types: Boolean, string, float, long and integer Shared among application components running in the same application context //Getting Context example public class MyActivity extends Activity { public void method() { Context actcontext = this; // since Activity extends Context Context appcontext = getapplicationcontext(); Context vwcontext = ((Button)findViewById(R.id.btn_id)).getContext(); } } Page 7 Fall 2011 CS 495/595 - App Development for Smart Devices

8 Using Shared Preferences Shared across an application s components, but are not available to other applications Caveat: they can be made available to multiple processes within same application, but be careful Stored as XML in the protected application directory on main memory (usually /data/data/<package name>/shared_prefs/<sp Name>.xml) Page 8 Fall 2011 CS 495/595 - App Development for Smart Devices

9 DDMS-File Explorer (Window > Open Perspective > Other... > DDMS) Page 9 Fall 2011 CS 495/595 - App Development for Smart Devices

10 Creating and Sharing Prefs public static String MY_PREFS = "MY_PREFS"; int mode = Activity.MODE_PRIVATE; SharedPreferences mysharedpreferences = getsharedpreferences(my_prefs, mode); SharedPreferences.Editor editor = mysharedpreferences.edit(); // Store new primitive types in the shared preferences object. editor.putboolean("istrue", true); editor.putfloat("lastfloat", 1f); editor.putint("wholenumber", 2); editor.putlong("anumber", 3l); editor.putstring("textentryvalue", "Not Empty"); // Commit the changes. editor.commit(); Page 10 Fall 2011 CS 495/595 - App Development for Smart Devices

11 Retrieving public static String MY_PREFS = "MY_PREFS"; public void loadpreferences() { // Get the stored preferences int mode = Activity.MODE_PRIVATE; SharedPreferences mysharedpreferences = getsharedpreferences(my_prefs, mode); } // Retrieve the saved values. boolean istrue = mysharedpreferences.getboolean("istrue", false); float lastfloat = mysharedpreferences.getfloat("lastfloat", 0f); int wholenumber = mysharedpreferences.getint("wholenumber", 1); long anumber = mysharedpreferences.getlong("anumber", 0); String stringpreference = mysharedpreferences.getstring("textentryvalue", ""); Page 11 Fall 2011 CS 495/595 - App Development for Smart Devices

12 Preference Activity System-style preference screens Familiar Can merge settings from other apps (e.g., system settings such as location) 3 parts Preference Screen Layout (XML) Extension of PreferenceActivity onsharedpreferencechangelistener Page 12 Fall 2011 CS 495/595 - App Development for Smart Devices

13 Preference Activity XML <?xml version="1.0" encoding="utf-8"?> <PreferenceScreen xmlns:android=" <PreferenceCategory android:title="my Preference Category"/> <CheckBoxPreference android:key="pref_check_box" android:title="check Box Preference" android:summary="check Box Preference Description" android:defaultvalue="true" /> </PreferenceCategory> </PreferenceScreen> Page 13 Fall 2011 CS 495/595 - App Development for Smart Devices

14 Preference Activity Options CheckBoxPreference EditTextPreference ListPreference RingtonePreference Page 14 Fall 2011 CS 495/595 - App Development for Smart Devices

15 Preference Activity Public class MyPreferenceActivity extends PreferenceActivity Public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); addpreferencesfromresource(r.xml.preferences); } } In manifest... <activity android:name=.mypreferenceactivity android:label= My Preferences > To start... Intent I = new Intent(this, MyPreferenceActivity.class); startactivityforresult(i, SHOW_PREFERENCES); Page 15 Fall 2011 CS 495/595 - App Development for Smart Devices

16 Using prefs from Pref. Activity Recorded shared prefs are stored in Application Context. Therefore, available to any component: Activities Services BroadcastReceiver Context context = getapplicationcontext(); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); // then Retrieve values using get<type> method Page 16 Fall 2011 CS 495/595 - App Development for Smart Devices

17 SP change listeners Run some code whenever a Shared Preference value is added, removed, modified Useful for Activities or Services that use SP framework to set application preferences Page 17 Fall 2011 CS 495/595 - App Development for Smart Devices

18 SP change listeners public class MyActivity extends Activity implements OnSharedPreferenceChangeListener public void oncreate(bundle SavedInstanceState) { // Register this OnSharedPreferenceChangeListener Context context = getapplicationcontext(); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); prefs.registeronsharedpreferencechangelistener(this); } } public void onsharedpreferencechanged(sharedpreferences prefs, String key) { // TODO Check the shared preference and key parameters // and change UI or behavior as appropriate. } Page 18 Fall 2011 CS 495/595 - App Development for Smart Devices

19 Activity Local Preferences Only be used within the activity and can not be used by other components of the application. //Storing Local Preferences SharedPreferences preferences = getpreference(mode_private); SharedPreferences.Editor editor = preferences.edit(); editor.putint("storedint", storedpreference); // value to store editor.commit(); //Retrieving Local Preferences SharedPreferences preferences = getpreferences(mode_private); int storedpreference = preferences.getint("storedint", 0); // use the values Page 19 Fall 2011 CS 495/595 - App Development for Smart Devices

20 Bundles Page 20 Spring 2011 CS 752/852 - Wireless and Mobile Networking

21 Bundles Activities offer onsaveinstancestate handler Works like SharedPreferences Bundle parameter represents key/value map of primitive types that can be used save the Activity s instance values Bundle made available as a parameter passed in to the oncreate and onrestoreinstance method handlers Bundle stores info needed to recreate UI state Page 21 Fall 2011 CS 495/595 - App Development for Smart Devices

22 Saving public void onsaveinstancestate(bundle savedinstancestate) { // Save UI state changes to the savedinstancestate. // This bundle will be passed to oncreate if the process is // killed and restarted. savedinstancestate.putboolean("myboolean", true); savedinstancestate.putdouble("mydouble", 1.9); savedinstancestate.putint("myint", 1); savedinstancestate.putstring("mystring", "Welcome back to Android"); // etc. } super.onsaveinstancestate(savedinstancestate); Page 22 Fall 2011 CS 495/595 - App Development for Smart Devices

23 Restoring public void onrestoreinstancestate(bundle savedinstancestate) { super.onrestoreinstancestate(savedinstancestate); } // Restore UI state from the savedinstancestate. // This bundle has also been passed to oncreate. boolean myboolean = savedinstancestate.getboolean("myboolean"); double mydouble = savedinstancestate.getdouble("mydouble"); int myint = savedinstancestate.getint("myint"); String mystring = savedinstancestate.getstring("mystring"); Page 23 Fall 2011 CS 495/595 - App Development for Smart Devices

24 Data Files Page 24 Spring 2011 CS 752/852 - Wireless and Mobile Networking

25 Saving/loading files Biggest decision: location Local vs Remote Internal vs External Code is standard Java String FILE_NAME = "tempfile.tmp"; // Create a new output file stream that s private to this application. FileOutputStream fos = openfileoutput(file_name, Context.MODE_PRIVATE); // Create a new file input stream. FileInputStream fis = openfileinput(file_name); Page 25 Fall 2011 CS 495/595 - App Development for Smart Devices

26 Saving/loading files Can only write in current application folder (/data/data/<package_name>/files/<filename>) or external storage (e.g., /mnt/sdcard/<filename>) Exception thrown otherwise For external, must be careful about availability of storage card Behavior when docked Cards get wiped Page 26 Fall 2011 CS 495/595 - App Development for Smart Devices

27 Static files as resources Only good option for small files that NEVER change Otherwise, grab on the fly from net Put in res/raw folder Resources myresources = getresources(); InputStream myfile = myresources.openrawresource(r.raw.myfilename); Page 27 Fall 2011 CS 495/595 - App Development for Smart Devices

28 Handling SD Card Writing Permission (AndroidManifest.xml) <uses-permission android:name="android.permission.write_external_storage"> </uses-permission> Page 28 Fall 2011 CS 495/595 - App Development for Smart Devices

29 Check SD card! private static final String ERR_SD_MISSING_MSG = ERRSD cannot see your SD card. Please reinstall it and do not remove it."; private static final String ERR_SD_UNREADABLE_MSG = "CITY cannot read your SD (memory) card. This is probably because your phone is plugged into your computer. Please unplug it and try again."; public static String getsdcard() throws ERRSDException { if (Environment.getExternalStorageState().equals( Environment.MEDIA_REMOVED)) throw new ERRSDException(ERR_SD_MISSING_MSG); else if (!Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)) throw new ERRSDException(ERR_SD_UNREADABLE_MSG); File sdcard = Environment.getExternalStorageDirectory(); // /mnt/sdcard if (!sdcard.exists()) throw new ERRSDException(ERR_SD_MISSING_MSG); if (!sdcard.canread()) //for writing sdcard.canwrite() throw new ERRSDException(ERR_SD_UNREADABLE_MSG); } return sdcard.tostring(); Page 29 Fall 2011 CS 495/595 - App Development for Smart Devices

30 Other data storage options Later in the course: Local database (SQLite) If you need to perform queries on data Content Providers to share data External database Grab info on demand (or overnight) If you can rely on sporadic Internet connectivity Page 30 Fall 2011 CS 495/595 - App Development for Smart Devices

31 Questions? Page 31 Spring 2011 CS 752/852 - Wireless and Mobile Networking

32 TO DO Check your paper assignment on the class webpage 8-10 slides minutes presentations Implement Sudoku in Ch. 4 (highly recommended) Project teams (team s name, team s member) due date: Friday Sep 16 th, 11:59pm Page 32 Fall 2011 CS 495/595 - App Development for Smart Devices

Programming with Android: Data management. Dipartimento di Scienze dell Informazione Università di Bologna

Programming with Android: Data management. Dipartimento di Scienze dell Informazione Università di Bologna Programming with Android: Data management Luca Bedogni Marco Di Felice Dipartimento di Scienze dell Informazione Università di Bologna Data: outline Data Management in Android Preferences Text Files XML

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

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

Single Application Persistent Data Storage

Single Application Persistent Data Storage Single Application Persistent Data Storage Files SharedPreferences SQLite database Represents a file system entity identified by a pathname Storage areas classified as internal or external Internal memory

More information

Programming Mobile Applications with Android

Programming Mobile Applications with Android Programming Mobile Applications 22-26 September, Albacete, Spain Jesus Martínez-Gómez Introduction to advanced android capabilities Maps and locations.- How to use them and limitations. Sensors.- Using

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

App Development for Smart Devices. Lec #4: Services and Broadcast Receivers Try It Out

App Development for Smart Devices. Lec #4: Services and Broadcast Receivers Try It Out App Development for Smart Devices CS 495/595 - Fall 2013 Lec #4: Services and Broadcast Receivers Try It Out Tamer Nadeem Dept. of Computer Science Try It Out Example 1 (in this slides) Example 2 (in this

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

Praktikum Entwicklung Mediensysteme (für Master)

Praktikum Entwicklung Mediensysteme (für Master) Praktikum Entwicklung Mediensysteme (für Master) Storing, Retrieving and Exposing Data Introduction All application data are private to an application Mechanisms to make data available for other applications

More information

PROGRAMMING IN ANDROID. IOANNIS (JOHN) PAPAVASILEIOU OCTOBER 24 2013 papabasile@engr.uconn.edu

PROGRAMMING IN ANDROID. IOANNIS (JOHN) PAPAVASILEIOU OCTOBER 24 2013 papabasile@engr.uconn.edu PROGRAMMING IN ANDROID IOANNIS (JOHN) PAPAVASILEIOU OCTOBER 24 2013 papabasile@engr.uconn.edu WHAT IS IT Software platform Operating system Key apps Developers: Google Open Handset Alliance Open Source

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

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

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

AdFalcon Android SDK 2.1.4 Developer's Guide. AdFalcon Mobile Ad Network Product of Noqoush Mobile Media Group

AdFalcon Android SDK 2.1.4 Developer's Guide. AdFalcon Mobile Ad Network Product of Noqoush Mobile Media Group AdFalcon Android SDK 214 Developer's Guide AdFalcon Mobile Ad Network Product of Noqoush Mobile Media Group Table of Contents 1 Introduction 3 Supported Android version 3 2 Project Configurations 4 Step

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

Programming Android applications: an incomplete introduction. J. Serrat Software Design December 2013

Programming Android applications: an incomplete introduction. J. Serrat Software Design December 2013 Programming Android applications: an incomplete introduction J. Serrat Software Design December 2013 Preliminaries : Goals Introduce basic programming Android concepts Examine code for some simple examples

More information

06 Team Project: Android Development Crash Course; Project Introduction

06 Team Project: Android Development Crash Course; Project Introduction M. Kranz, P. Lindemann, A. Riener 340.301 UE Principles of Interaction, 2014S 06 Team Project: Android Development Crash Course; Project Introduction April 11, 2014 Priv.-Doz. Dipl.-Ing. Dr. Andreas Riener

More information

Introduction to Android SDK Jordi Linares

Introduction to Android SDK Jordi Linares Introduction to Android SDK Introduction to Android SDK http://www.android.com Introduction to Android SDK Google -> OHA (Open Handset Alliance) The first truly open and comprehensive platform for mobile

More information

App Development for Smart Devices. Lec #2: Android Tools, Building Applications, and Activities

App Development for Smart Devices. Lec #2: Android Tools, Building Applications, and Activities App Development for Smart Devices CS 495/595 - Fall 2011 Lec #2: Android Tools, Building Applications, and Activities Tamer Nadeem Dept. of Computer Science Objective Understand Android Tools Setup Android

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

CSE476 Mobile Application Development. Yard. Doç. Dr. Tacha Serif tserif@cse.yeditepe.edu.tr. Department of Computer Engineering Yeditepe University

CSE476 Mobile Application Development. Yard. Doç. Dr. Tacha Serif tserif@cse.yeditepe.edu.tr. Department of Computer Engineering Yeditepe University CSE476 Mobile Application Development Yard. Doç. Dr. Tacha Serif tserif@cse.yeditepe.edu.tr Department of Computer Engineering Yeditepe University Fall 2015 Yeditepe University 2015 Outline Dalvik Debug

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

File System. /boot /system /recovery /data /cache /misc. /sdcard /sd-ext. Also Below are the for SD Card Fie System Partitions.

File System. /boot /system /recovery /data /cache /misc. /sdcard /sd-ext. Also Below are the for SD Card Fie System Partitions. Android File System Babylon University, IT College, SW Dep., Android Assist. Lecturer : Wadhah R. Baiee (2014) Ref: Wei-Meng Lee, BEGINNING ANDROID 4 APPLICATION DEVELOPMENT, Ch6, John Wiley & Sons, 2012

More information

Mono for Android Activity Lifecycle Activity Lifecycle Concepts and Overview

Mono for Android Activity Lifecycle Activity Lifecycle Concepts and Overview Mono for Android Lifecycle Lifecycle Concepts and Overview Xamarin Inc. BRIEF Overview Activities are a fundamental building block of Android Applications and they can exist in a number of different states.

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

Persistent data storage

Persistent data storage Mobila tjänster och trådlösa nät HT 2013 HI1033 Lecturer: Anders Lindström, anders.lindstrom@sth.kth.se Lecture 6 Today s topics Files Android Databases SQLite Content Providers Persistent data storage

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

Android Fundamentals 1

Android Fundamentals 1 Android Fundamentals 1 What is Android? Android is a lightweight OS aimed at mobile devices. It is essentially a software stack built on top of the Linux kernel. Libraries have been provided to make tasks

More information

Android Application Development: Hands- On. Dr. Jogesh K. Muppala muppala@cse.ust.hk

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

More information

Mobile App Sensor Documentation (English Version)

Mobile App Sensor Documentation (English Version) Mobile App Sensor Documentation (English Version) Mobile App Sensor Documentation (English Version) Version: 1.2.1 Date: 2015-03-25 Author: email: Kantar Media spring support@spring.de Content Mobile App

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

Mobile Application Development

Mobile Application Development Mobile Application Development (Android & ios) Tutorial Emirates Skills 2015 3/26/2015 1 What is Android? An open source Linux-based operating system intended for mobile computing platforms Includes a

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

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

Introduction to Android. CSG250 Wireless Networks Fall, 2008

Introduction to Android. CSG250 Wireless Networks Fall, 2008 Introduction to Android CSG250 Wireless Networks Fall, 2008 Outline Overview of Android Programming basics Tools & Tricks An example Q&A Android Overview Advanced operating system Complete software stack

More information

Android Development Introduction CS314

Android Development Introduction CS314 Android Development Introduction CS314 Getting Started Download and Install Android Studio: http://developer.android.com/tools/studio/index. html This is the basic Android IDE and supports most things

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 APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I)

ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I) ANDROID APPS DEVELOPMENT FOR MOBILE AND TABLET DEVICE (LEVEL I) Who am I? Lo Chi Wing, Peter Lecture 1: Introduction to Android Development Email: Peter@Peter-Lo.com Facebook: http://www.facebook.com/peterlo111

More information

Wireless Systems Lab. First Lesson. Wireless Systems Lab - 2014

Wireless Systems Lab. First Lesson. Wireless Systems Lab - 2014 Wireless Systems Lab First Lesson About this course Internet of Things Android and sensors Mobile sensing Indoor localization Activity recognition others.. Exercises Projects :) Internet of Things Well-known

More information

Managing Android Fragmentation. Carter Jernigan two forty four a.m. LLC

Managing Android Fragmentation. Carter Jernigan two forty four a.m. LLC Managing Android Fragmentation Carter Jernigan two forty four a.m. LLC #1 Android 2.1+ only http://developer.android.com/resources/dashboard/platform-versions.html Only 1.6% of all Android users are running

More information

Login with Amazon Getting Started Guide for Android. Version 2.0

Login with Amazon Getting Started Guide for Android. Version 2.0 Getting Started Guide for Android Version 2.0 Login with Amazon: Getting Started Guide for Android Copyright 2016 Amazon.com, Inc., or its affiliates. All rights reserved. Amazon and the Amazon logo are

More information

Beginner s Android Development Tutorial!

Beginner s Android Development Tutorial! Beginner s Android Development Tutorial! Georgia Tech Research Network Operations Center (RNOC)! cic.gatech.edu Questions? Get in touch! piazza.com/gatech/spring2015/cic rnoc-lab-staff@lists.gatech.edu

More information

ECWM511 MOBILE APPLICATION DEVELOPMENT Lecture 1: Introduction to Android

ECWM511 MOBILE APPLICATION DEVELOPMENT Lecture 1: Introduction to Android Why Android? ECWM511 MOBILE APPLICATION DEVELOPMENT Lecture 1: Introduction to Android Dr Dimitris C. Dracopoulos A truly open, free development platform based on Linux and open source A component-based

More information

TomTom PRO 82xx PRO.connect developer guide

TomTom PRO 82xx PRO.connect developer guide TomTom PRO 82xx PRO.connect developer guide Contents Introduction 3 Preconditions 4 Establishing a connection 5 Preparations on Windows... 5 Preparations on Linux... 5 Connecting your TomTom PRO 82xx device

More information

Android Environment SDK

Android Environment SDK Part 2-a Android Environment SDK Victor Matos Cleveland State University Notes are based on: Android Developers http://developer.android.com/index.html 1 Android Environment: Eclipse & ADT The Android

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

Introduction to Android Development. Daniel Rodrigues, Buuna 2014

Introduction to Android Development. Daniel Rodrigues, Buuna 2014 Introduction to Android Development Daniel Rodrigues, Buuna 2014 Contents 1. Android OS 2. Development Tools 3. Development Overview 4. A Simple Activity with Layout 5. Some Pitfalls to Avoid 6. Useful

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

IOIO for Android Beginners Guide Introduction

IOIO for Android Beginners Guide Introduction IOIO for Android Beginners Guide Introduction This is the beginners guide for the IOIO for Android board and is intended for users that have never written an Android app. The goal of this tutorial is to

More information

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

Mobile Security - Tutorial 1. Beginning Advanced Android Development Brian Ricks Fall 2014 Mobile Security - Tutorial 1 Beginning Advanced Android Development Brian Ricks Fall 2014 Before we begin... I took your Wireless Network Security course in Spring... are you gonna have memes in this?

More information

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

directory to d:\myproject\android. Hereafter, I shall denote the android installed directory as 1 of 6 2011-03-01 12:16 AM yet another insignificant programming notes... HOME Android SDK 2.2 How to Install and Get Started Introduction Android is a mobile operating system developed by Google, which

More information

Developing Android Apps: Part 1

Developing Android Apps: Part 1 : Part 1 d.schmidt@vanderbilt.edu www.dre.vanderbilt.edu/~schmidt Institute for Software Integrated Systems Vanderbilt University Nashville, Tennessee, USA CS 282 Principles of Operating Systems II Systems

More information

Android Environment SDK

Android Environment SDK Part 2-a Android Environment SDK Victor Matos Cleveland State University Notes are based on: Android Developers http://developer.android.com/index.html 1 2A. Android Environment: Eclipse & ADT The Android

More information

Hello World! Some code

Hello World! Some code Embedded Systems Programming Hello World! Lecture 10 Verónica Gaspes www2.hh.se/staff/vero What could an Android hello world application be like? Center for Research on Embedded Systems School of Information

More information

Android Programming. Android App. Høgskolen i Telemark Telemark University College. Cuong Nguyen, 2013.06.19

Android Programming. Android App. Høgskolen i Telemark Telemark University College. Cuong Nguyen, 2013.06.19 Høgskolen i Telemark Telemark University College Department of Electrical Engineering, Information Technology and Cybernetics Android Programming Cuong Nguyen, 2013.06.19 Android App Faculty of Technology,

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

WRITING DATA TO A BINARY FILE

WRITING DATA TO A BINARY FILE WRITING DATA TO A BINARY FILE TEXT FILES VS. BINARY FILES Up to now, we have looked at how to write and read characters to and from a text file. Text files are files that contain sequences of characters.

More information

ECWM511 MOBILE APPLICATION DEVELOPMENT Lecture 1: Introduction to Android

ECWM511 MOBILE APPLICATION DEVELOPMENT Lecture 1: Introduction to Android Why Android? ECWM511 MOBILE APPLICATION DEVELOPMENT Lecture 1: Introduction to Android Dr Dimitris C. Dracopoulos A truly open, free development platform based on Linux and open source A component-based

More information

Using Extensions or Cordova Plugins in your RhoMobile Application Darryn Campbell @darryncampbell

Using Extensions or Cordova Plugins in your RhoMobile Application Darryn Campbell @darryncampbell Using Extensions or Cordova Plugins in your RhoMobile Application Darryn Campbell @darryncampbell Application Architect Agenda Creating a Rho Native Extension on Android Converting a Cordova Plugin to

More information

Advantages. manage port forwarding, set breakpoints, and view thread and process information directly

Advantages. manage port forwarding, set breakpoints, and view thread and process information directly Part 2 a Android Environment SDK Victor Matos Cleveland State University Notes are based on: Android Developers http://developer.android.com/index.html 1 Android Environment: Eclipse & ADT The Android

More information

Android app development course

Android app development course Android app development course Unit 4- + Performing actions in the background. Services, AsyncTasks, Loaders. Notificacions, Alarms 1 Services A Service Is an app component that can perform long-running

More information

Android For Java Developers. Marko Gargenta Marakana

Android For Java Developers. Marko Gargenta Marakana Android For Java Developers Marko Gargenta Marakana Agenda Android History Android and Java Android SDK Hello World! Main Building Blocks Debugging Summary History 2005 Google buys Android, Inc. Work on

More information

Android Studio Application Development

Android Studio Application Development Android Studio Application Development Belén Cruz Zapata Chapter No. 4 "Using the Code Editor" In this package, you will find: A Biography of the author of the book A preview chapter from the book, Chapter

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 Development. http://developer.android.com/develop/ 吳 俊 興 國 立 高 雄 大 學 資 訊 工 程 學 系

Android Development. http://developer.android.com/develop/ 吳 俊 興 國 立 高 雄 大 學 資 訊 工 程 學 系 Android Development http://developer.android.com/develop/ 吳 俊 興 國 立 高 雄 大 學 資 訊 工 程 學 系 Android 3D 1. Design 2. Develop Training API Guides Reference 3. Distribute 2 Development Training Get Started Building

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 paul.guermonprez@intel.com Intel Software 2013-02-08 Persistence Preferences Shared preference

More information

Objective. Android Sensors. Sensor Manager Sensor Types Examples. Page 2

Objective. Android Sensors. Sensor Manager Sensor Types Examples. Page 2 Android Sensors Objective Android Sensors Sensor Manager Sensor Types Examples Page 2 Android.hardware Support for Hardware classes with some interfaces Camera: used to set image capture settings, start/stop

More information

Intro to Android Development 2. Accessibility Capstone Nov 23, 2010

Intro to Android Development 2. Accessibility Capstone Nov 23, 2010 Intro to Android Development 2 Accessibility Capstone Nov 23, 2010 Outline for Today Application components Activities Intents Manifest file Visual user interface Creating a user interface Resources TextToSpeech

More information

Boardies IT Solutions info@boardiesitsolutions.com Tel: 01273 252487

Boardies IT Solutions info@boardiesitsolutions.com Tel: 01273 252487 Navigation Drawer Manager Library H ow to implement Navigation Drawer Manager Library into your A ndroid Applications Boardies IT Solutions info@boardiesitsolutions.com Tel: 01273 252487 Contents Version

More information

Spring Design ScreenShare Service SDK Instructions

Spring Design ScreenShare Service SDK Instructions Spring Design ScreenShare Service SDK Instructions V1.0.8 Change logs Date Version Changes 2013/2/28 1.0.0 First draft 2013/3/5 1.0.1 Redefined some interfaces according to issues raised by Richard Li

More information

Lecture 09 Data Storage

Lecture 09 Data Storage Lecture Overview Lecture 09 Data Storage HIT3328 / HIT8328 Software Development for Mobile Devices Dr. Rajesh Vasa, 2011 Twitter: @rvasa Blog: http://rvasa.blogspot.com 1 2 Mobile devices have a specialization

More information

Developing for MSI Android Devices

Developing for MSI Android Devices Android Application Development Enterprise Features October 2013 Developing for MSI Android Devices Majority is the same as developing for any Android device Fully compatible with Android SDK We test using

More information

Android app development course

Android app development course Android app development course Unit 7- + Beyond Android Activities. SMS. Audio, video, camera. Sensors 1 SMS We can send an SMS through Android's native client (using an implicit Intent) Intent smsintent

More information

HTTPS hg clone https://bitbucket.org/dsegna/device plugin library SSH hg clone ssh://hg@bitbucket.org/dsegna/device plugin library

HTTPS hg clone https://bitbucket.org/dsegna/device plugin library SSH hg clone ssh://hg@bitbucket.org/dsegna/device plugin library Contents Introduction... 2 Native Android Library... 2 Development Tools... 2 Downloading the Application... 3 Building the Application... 3 A&D... 4 Polytel... 6 Bluetooth Commands... 8 Fitbit and Withings...

More information

Android Framework. How to use and extend it

Android Framework. How to use and extend it Android Framework How to use and extend it Lectures 9/10 Android Security Security threats Security gates Android Security model Bound Services Complex interactions with Services Alberto Panizzo 2 Lecture

More information

Lecture 1 Introduction to Android

Lecture 1 Introduction to Android These slides are by Dr. Jaerock Kwon at. The original URL is http://kettering.jrkwon.com/sites/default/files/2011-2/ce-491/lecture/alecture-01.pdf so please use that instead of pointing to this local copy

More information

CS 111 Classes I 1. Software Organization View to this point:

CS 111 Classes I 1. Software Organization View to this point: CS 111 Classes I 1 Software Organization View to this point: Data Objects and primitive types Primitive types operators (+, /,,*, %). int, float, double, char, boolean Memory location holds the data Objects

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 Application Model

Android Application Model Android Application Model Content - Activities - Intent - Tasks / Applications - Lifecycle - Processes and Thread - Services - Content Provider Dominik Gruntz IMVS dominik.gruntz@fhnw.ch 1 Android Software

More information

An Android-based Instant Message Application

An Android-based Instant Message Application An Android-based Instant Message Application Qi Lai, Mao Zheng and Tom Gendreau Department of Computer Science University of Wisconsin - La Crosse La Crosse, WI 54601 mzheng@uwlax.edu Abstract One of the

More information

Operating System Support for Inter-Application Monitoring in Android

Operating System Support for Inter-Application Monitoring in Android Operating System Support for Inter-Application Monitoring in Android Daniel M. Jackowitz Spring 2013 Submitted in partial fulfillment of the requirements of the Master of Science in Software Engineering

More information

Presenting Android Development in the CS Curriculum

Presenting Android Development in the CS Curriculum Presenting Android Development in the CS Curriculum Mao Zheng Hao Fan Department of Computer Science International School of Software University of Wisconsin-La Crosse Wuhan University La Crosse WI, 54601

More information

Sending and Receiving Data via Bluetooth with an Android Device

Sending and Receiving Data via Bluetooth with an Android Device Sending and Receiving Data via Bluetooth with an Android Device Brian Wirsing March 26, 2014 Abstract Android developers often need to use Bluetooth in their projects. Unfortunately, Bluetooth can be confusing

More information

java.util.scanner Here are some of the many features of Scanner objects. Some Features of java.util.scanner

java.util.scanner Here are some of the many features of Scanner objects. Some Features of java.util.scanner java.util.scanner java.util.scanner is a class in the Java API used to create a Scanner object, an extremely versatile object that you can use to input alphanumeric characters from several input sources

More information

CS170 Lab 11 Abstract Data Types & Objects

CS170 Lab 11 Abstract Data Types & Objects CS170 Lab 11 Abstract Data Types & Objects Introduction: Abstract Data Type (ADT) An abstract data type is commonly known as a class of objects An abstract data type in a program is used to represent (the

More information

ANDROID APPLICATION FOR FILE STORAGE AND RETRIEVAL OVER SECURED AND DISTRIBUTED FILE SERVERS SOWMYA KUKKADAPU B.E., OSMANIA UNIVERSITY, 2010 A REPORT

ANDROID APPLICATION FOR FILE STORAGE AND RETRIEVAL OVER SECURED AND DISTRIBUTED FILE SERVERS SOWMYA KUKKADAPU B.E., OSMANIA UNIVERSITY, 2010 A REPORT ANDROID APPLICATION FOR FILE STORAGE AND RETRIEVAL OVER SECURED AND DISTRIBUTED FILE SERVERS by SOWMYA KUKKADAPU B.E., OSMANIA UNIVERSITY, 2010 A REPORT submitted in partial fulfillment of the requirements

More information

Android Bootcamp. Elaborado (com adaptações) a partir dos tutoriais:

Android Bootcamp. Elaborado (com adaptações) a partir dos tutoriais: Android Bootcamp Elaborado (com adaptações) a partir dos tutoriais: http://developer.android.com/resources/tutorials/hello-world.html http://developer.android.com/resources/tutorials/views/index.html Bootcamp

More information

Introduction to Android Programming (CS5248 Fall 2015)

Introduction to Android Programming (CS5248 Fall 2015) Introduction to Android Programming (CS5248 Fall 2015) Aditya Kulkarni (email.aditya.kulkarni@gmail.com) August 26, 2015 *Based on slides from Paresh Mayami (Google Inc.) Contents Introduction Android

More information

APPFORUM2014. Helping the developer community build next-generation, multi-platform apps. SCHAUMBURG, ILLINOIS SEPTEMBER 8-10

APPFORUM2014. Helping the developer community build next-generation, multi-platform apps. SCHAUMBURG, ILLINOIS SEPTEMBER 8-10 APPFORUM2014 Helping the developer community build next-generation, multi-platform apps. SCHAUMBURG, ILLINOIS SEPTEMBER 8-10 NFC OVERVIEW Chuck Bolen Chief Architect Enterprise Mobile Computing APPFORUM2014

More information

4. The Android System

4. The Android System 4. The Android System 4. The Android System System-on-Chip Emulator Overview of the Android System Stack Anatomy of an Android Application 73 / 303 4. The Android System Help Yourself Android Java Development

More information

Developing an Android App. CSC207 Fall 2014

Developing an Android App. CSC207 Fall 2014 Developing an Android App CSC207 Fall 2014 Overview Android is a mobile operating system first released in 2008. Currently developed by Google and the Open Handset Alliance. The OHA is a consortium of

More information

Orders.java. ArrayList of Drinks as they are ordered. Functions to calculate statistics on Drinks

Orders.java. ArrayList of Drinks as they are ordered. Functions to calculate statistics on Drinks Business and Point of Sale App Using Classes and Lists to Organize Data The Coffee App Description: This app uses a multiple class structure to create an interface where a user can select options for ordering

More information

Advanced Java Client API

Advanced Java Client API 2012 coreservlets.com and Dima May Advanced Java Client API Advanced Topics Originals of slides and source code for examples: http://www.coreservlets.com/hadoop-tutorial/ Also see the customized Hadoop

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

Cryptography 456 Senior Seminar 599 USC Upstate Encrypted One-Way File Transfer on Android Devices. By Sheldon Smith, Instructor Dr.

Cryptography 456 Senior Seminar 599 USC Upstate Encrypted One-Way File Transfer on Android Devices. By Sheldon Smith, Instructor Dr. Cryptography 456 Senior Seminar 599 USC Upstate Encrypted One-Way File Transfer on Android Devices By Sheldon Smith, Instructor Dr. Zhong Contents One-Way File Transfer Diagram Utilizing Cryptography Asymmetric

More information

Advertiser Campaign SDK Your How-to Guide

Advertiser Campaign SDK Your How-to Guide Advertiser Campaign SDK Your How-to Guide Using Leadbolt Advertiser Campaign SDK with Android Apps Version: Adv2.03 Copyright 2012 Leadbolt All rights reserved Disclaimer This document is provided as-is.

More information

GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS

GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS Embedded Systems White Paper GETTING STARTED WITH ANDROID DEVELOPMENT FOR EMBEDDED SYSTEMS September 2009 ABSTRACT Android is an open source platform built by Google that includes an operating system,

More information

Chulalongkorn University International School of Engineering Department of Computer Engineering 2140105 Computer Programming Lab.

Chulalongkorn University International School of Engineering Department of Computer Engineering 2140105 Computer Programming Lab. Chulalongkorn University Name International School of Engineering Student ID Department of Computer Engineering Station No. 2140105 Computer Programming Lab. Date Lab 2 Using Java API documents, command

More information

Creating a 2D Game Engine for Android OS. Introduction

Creating a 2D Game Engine for Android OS. Introduction Creating a 2D Game Engine for Android OS Introduction This tutorial will lead you through the foundations of creating a 2D animated game for the Android Operating System. The goal here is not to create

More information

J a v a Quiz (Unit 3, Test 0 Practice)

J a v a Quiz (Unit 3, Test 0 Practice) Computer Science S-111a: Intensive Introduction to Computer Science Using Java Handout #11 Your Name Teaching Fellow J a v a Quiz (Unit 3, Test 0 Practice) Multiple-choice questions are worth 2 points

More information