Lecture 13 Mobile Programming. Google Maps Android API

Size: px
Start display at page:

Download "Lecture 13 Mobile Programming. Google Maps Android API"

Transcription

1 Lecture 13 Mobile Programming Google Maps Android API

2 Agenda Generating MD5 Fingerprint Signing up for API Key (as developer) Permissions MapView and MapActivity Layers MyLocation

3 Important!!! These lecture slides are based on Google Maps Android API V2. V1 has been deprecated but if you are interested you can find the tutorials here

4 Google Maps API Key In order to use the Google Maps API, you first need to obtain an API key and configure your app Google Maps Android API V2 requires the installation/configuration of the Google Play Services SDK Installed Using the SDK Manager Available in the extras/google/google_play_services/libproject/google-pla y-services-lib folder of your SDK directory To test using the emulator it must be using Google API version or later or 2.3 for a physical device

5 Google Maps API - Dependencies Add to build.gradle: compile 'com.google.android.gms:play-services-maps:11.8.0' If you are unsure of which version #, there is another way! Right-click your project and select Open Module Settings or press F4 (Windows/Linux) Select the Dependencies tab Click the plus symbol and select Library dependency Enter play-services-maps and click search Select newest version Click OK

6 Google Maps API - Google Play Services After adding the library reference to your app, add the following to the AndroidManifest.xml file <application> node <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />

7 Getting Google Maps API Key Need to create API key for Google Maps Three methods: a. Fast - Using Android Studio b. Less Fast - Also using Android Studio c. Full form - Complete form

8 Getting Google Maps API Key - Fast method Create Google Maps app using Android Studio This generates google_maps_api.xml file Open file, copy URL into browser, and click Create New App -> authenticate Copy given API key

9 Getting Google Maps API Key - Less fast method Create Google Maps app using Android Studio Copy credentials from google_maps_api.xml Open Google Developer Console Create new app in Console using credentials Copy given API key

10 Getting Google Maps API Key - Complete full form Create Google Maps app (or start from scratch) using Android Studio Open Google Developer Console Create new Android app in Console Enable Google Maps API Copy given API key

11 Getting the MD5 Fingerprint (Optional) To register for a Maps API Key, you need to provide an MD5 fingerprint of the certificate that you will use to sign your application Navigate to C:\Documents and Settings\<User>\.android Run the following command keytool -list -alias androiddebugkey -storepass android -keypass android -keystore debug.keystore Copy the text that comes after Certificate fingerprint (SHA1): Also it is important to make a note of the package name for your application as you will need this to create the API key Go here and follow the instructions on creating a new API project and obtaining a Google Maps API Key Save the generated API key

12 Add the Maps API Key to Your App When creating your Android project, you need to choose one of the "Google APIs" options as your SDK target Add the following to the manifest file as a child of the application node <meta-data android:name= com.google.android.geo.api_key />

13 Add the Maps API Key to Your App We do not want to actually Why? Instead, add key to gradle file, let gradle add API to app Add the following to the gradle.properties file GOOGLE_MAPS_API_KEY=<API-KEY> Add the following to app/build.gradle resvalue "string", "google_maps_key", (project.findproperty("google_maps_api_key")?: "") This dynamically creates string in strings.xml i.e. <string name= google_maps_key >$GOOGLE_MAPS_API_KEY</string>

14 Example AndroidManifest... <application > <meta-data android:name="com.google.android.gms.version" /> <!-- The API key for Google Maps-based APIs. <meta-data android:name="com.google.android.geo.api_key" /> </application> </manifest>

15 Permissions To use the Google Maps API, you need android.permission.internet android.permission.access_network_state And of course, GPS or NETWORK provider permissions if you're going to use location-based services

16 Add the Maps to Your App The easiest and recommended method of adding Google Maps support to your application is by using a MapFragment Add the following to your XML layout file <fragment android:id="@+id/map" android:layout_width= "match_parent" android:layout_height= "match_parent" android:name= "com.google.android.gms.maps.supportmapfragment" />

17 MapView You can also use a MapView in your application instead of a MapFragment You MUST forward all the lifecycle from the containing Activity or Fragment to the corresponding ones in the MapView class oncreate(bundle) onresume() onpause() ondestroy() onsaveinstancestate() onlowmemory()

18 Google Maps - GoogleMap To interact with the map, you will need to get a handle on the GoogleMap object from your MapView or MapFragment You can do this with a call to the getmap() method e.g. GoogleMap map = ((MapFragment) getfragmentmanager().findfragmentbyid( R.id.map)).getMap();

19 GoogleMap - Center and Zoom If you want to be able to have the map centered on a specific location call map.animatecamera(cameraupdatefactory.newlat Lng(new LatLng(lat, lng))); To center and zoom call map.animatecamera(cameraupdatefactory.newlat LngZoom(new LatLng(lat, lng), zoomlevel));

20 GoogleMap - Center and Zoom By default the zoom controls are enabled on the map To set them specifically enabled/disabled call d) map.getuisettings().setzoomcontrolsenabled(enable where enabled is a boolean value

21 Layers - Overlay Classes Right now your Map looks bare and boring. At some point you may want to add some small icons to your map You can do this by adding overlays that will hover above the map itself. This is where things can get messy

22 Layers - Overlay Classes The overlay options vary by the type of overlay being added GroundOverlay (GroundOverlayOptions) Marker (MarkerOptions) TileOverlay (TileOverlayOptions) Circle (CircleOptions) PolyLines and Polygons For a full list see the Android developer documentation on the GoogleMap object

23 Layers - Overlay Classes Let's look at our MapActivity.onCreate()

24 Layers - Ground Overlay Add image to location public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); } MapFragment mapfragment = (MapFragment) getfragmentmanager().findfragmentbyid(r.id.map); GoogleMap map = mapfragment.getmap(); GroundOverlay overlay = mmap.addgroundoverlay(new GroundOverlayOptions().image(BitmapDescriptorFactory.fromResource(R.drawable.android_developers)).anchor(0, 1).position(classLocation, 8600f, 6500f)); map.addmarker(new MarkerOptions().position(classLocation).title("Marker in Love 103")); map.movecamera(cameraupdatefactory.newlatlngzoom(classlocation, 18));

25 Layers - Marker Overlay Add marker to location on public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); MapFragment mapfragment = (MapFragment) getfragmentmanager().findfragmentbyid(r.id.map) ; GoogleMap map = mapfragment.getmap(); map.addmarker(new MarkerOptions().position(new LatLng( , )).title( Hello ).snippet( Welcome to the Mobile Lab! ).icon(bitmapdescriptorfactory.fromresource( R.drawable.mobile_logo))); } map.animatecamera(cameraupdatefactory.newlatlngzoom( new LatLng( , ), 17.0f);

26 Layers - Polylines Overlay Add marker to location on public void onmapready(googlemap map) { Polyline polyline1 = map.addpolyline(new PolylineOptions().clickable(true).add( new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ), new LatLng( , ))); map.movecamera(cameraupdatefactory.newlatlngzoom(new LatLng( , ), 4)); // Set listeners for click events. map.setonpolylineclicklistener(this); map.setonpolygonclicklistener(this);

27 My Location You may want to show the user their location on the map How can you do this?

28 My Location The Maps API provides an easier way, by using a MyLocationOverlay This is handled in the background by the GoogleMap object

29 My Location public class MyLocationMapExample extends Activity { GoogleMap map; public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); MapFragment mapfragment = (MapFragment) getfragmentmanager().findfragmentbyid(r.id.map); map = mapfragment.getmap(); map.getuisettings().setcompassenabled(true); map.getuisettings().setmylocationbuttonenabled(true); map.setmylocationenabled(true); }

30 My Location public class MyLocationMapExample extends Activity implements GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServices.OnConnectionFailedListener { LocationClient client; GoogleMap map; public void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.main); MapFragment mapfragment = (MapFragment) getfragmentmanager().findfragmentbyid(r.id.map); map = mapfragment.getmap(); map.getuisettings().setcompassenabled(true); map.getuisettings().setmylocationbuttonenabled(true); map.setmylocationenabled(true); } This will show a compass when we add this Overlay to the map

31 My Location public class MyLocationMapExample extends Activity implements GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServices.OnConnectionFailedListener { LocationClient client; GoogleMap map; public void oncreate(bundle savedinstancestate) { } super.oncreate(savedinstancestate); setcontentview(r.layout.main); MapFragment mapfragment = (MapFragment) getfragmentmanager().findfragmentbyid(r.id.map); map = mapfragment.getmap(); map.getuisettings().setcompassenabled(true); map.getuisettings().setmylocationbuttonenabled(true); map.setmylocationenabled(true); This will enable the My Location Button

32 My Location public class MyLocationMapExample extends Activity implements GooglePlayServicesClient.ConnectionCallbacks, GooglePlayServices.OnConnectionFailedListener { LocationClient client; GoogleMap map; public void oncreate(bundle savedinstancestate) { } super.oncreate(savedinstancestate); setcontentview(r.layout.main); MapFragment mapfragment = (MapFragment) getfragmentmanager().findfragmentbyid(r.id.map); map = mapfragment.getmap(); map.getuisettings().setcompassenabled(true); map.getuisettings().setmylocationbuttonenabled(true); map.setmylocationenabled(true); This will enable the MyLocation overlay in the GoogleMap object

33 Satellite Mode Google Maps on the desktop allows you to view the map in satellite view You can do this using the Maps API also Just call setmaptype() on your GoogleMap object Type can be either GoogleMap.MAP_TYPE_SATELLITE GoogleMap.MAP_TYPE_HYBRID GoogleMap.MAP_TYPE_NONE GoogleMap.MAP_TYPE_NORMAL GoogleMap.MAP_TYPE_TERRAIN

34 Customize Map Style Can customize map colors/content e.g. Only display roads and bodies of water Create/Modify json style file HIGHLY customizable Add json file to res/raw Apply file using GoogleMap.setMapStyle()

35 Customize Map Style public void onmapready(googlemap googlemap) { try { boolean success = googlemap.setmapstyle( MapStyleOptions.loadRawResourceStyle(this, R.raw.map_style)); if (!success) { Log.e(TAG, "Style parsing failed."); } } catch (Resources.NotFoundException e) { Log.e(TAG, "Can't find style. Error: ", e); } }

36 Finding out where was clicked When the user clicks on one of your Overlay items, you don't need to perform any complex calculations to determine where on the Canvas was clicked This information is readily available Additionally the location on the map that was clicked can be obtained by setting the OnMapClickListener of the GoogleMap object

37 Finding out where was clicked map.setonmarkerclicklistener(new OnMarkerClickListener() public boolean onmarkerclick(marker arg0) { LatLng position = arg0.getposition(); Toast.makeText(getApplicationContext(), Lat: + position.latitude +, Lng: + position.longitude, Toast.LENGTH_LONG).show(); return true; } }); map.setonmapclicklistener(new OnMapClickListener() public void onmapclick(latlng arg0) { Toast.makeText(getApplicationContext(), Lat: + arg0.latitude +, Lng: + arg0.longitude, Toast.LENGTH_LONG).show(); return true; } });

38 Finding out where was clicked map.setonmapclicklistener(new OnMapClickListener() public void onmapclick(latlng arg0) { The LatLng object Point screenlocation; corresponding to the location screenlocation = map.getprojection().toscreenlocation(arg0); that was clicked on the map }); } Toast.makeText(getApplicationContext(), Lat: + arg0.latitude +, Lng: + arg0.longitude + ; x: + screenlocation.x +, y: + screenlocation.y, Toast.LENGTH_LONG).show();

39 Finding out where was clicked map.setonmapclicklistener(new OnMapClickListener() public void onmapclick(latlng arg0) { Point screenlocation; screenlocation = map.getprojection().toscreenlocation(arg0); }); } Toast.makeText(getApplicationContext(), Use a projection to get the Lat: + arg0.latitude +, Lng: + arg0.longitude screen location of the clicked location on the map + ; x: + screenlocation.x +, y: + screenlocation.y, Toast.LENGTH_LONG).show(); return true;

40 Showing a Popup instead of Toast In Google Maps for Android, when you click on an OverlayItem, it doesn't display a Toast, but it shows a popup that doesn't disappear This is done by default in Google Maps Android API V2 To override this default behavior implement your custom listener and return true

41 References Android Developers The Mobile Lab at Florida State University

Lab 6: Google Maps Android API v2 Android Studio 10/14/2016

Lab 6: Google Maps Android API v2 Android Studio 10/14/2016 Lab 6: Google Maps Android API v2 Android Studio 10/14/2016 One of the defining features of mobile phones is their portability. It's not surprising that some of the most enticing APIs are those that enable

More information

Programming with Android: The Google Maps Library. Slides taken from

Programming with Android: The Google Maps Library. Slides taken from Programming with Android: The Google Slides taken from Marco Di Felice Android: Deploying Map-based Apps Two versions of Android Google API API v1 API v2 - Deprecated, not supported anymore since 18th

More information

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology Mobile Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie Android Google Services" Part 1 Google+

More information

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology

Produced by. Mobile Application Development. David Drohan Department of Computing & Mathematics Waterford Institute of Technology Mobile Application Development Produced by David Drohan (ddrohan@wit.ie) Department of Computing & Mathematics Waterford Institute of Technology http://www.wit.ie Android Google Services" Part 1 Google+

More information

Android Programming วรเศรษฐ ส วรรณ ก.

Android Programming วรเศรษฐ ส วรรณ ก. Android Programming วรเศรษฐ ส วรรณ ก uuriter@yahoo.com http://bit.ly/wannikacademy 1 Google Map API v2 2 Preparation SDK Manager Google Play Services AVD Google API >= 4.2.2 [http://bit.ly/1hedxwm] https://developers.google.com/maps/documentation/android/start

More information

1. 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 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

Google Maps Troubleshooting

Google Maps Troubleshooting Google Maps Troubleshooting Before you go through the troubleshooting guide below, make sure that you ve consulted the class FAQ, Google s Map Activity Tutorial, as well as these helpful resources from

More information

CS371m - Mobile Computing. Maps

CS371m - Mobile Computing. Maps CS371m - Mobile Computing Maps Using Google Maps This lecture focuses on using Google Maps inside an Android app Alternatives Exist: Open Street Maps http://www.openstreetmap.org/ If you simply want to

More information

Fragments and the Maps API

Fragments and the Maps API Fragments and the Maps API Alexander Nelson October 6, 2017 University of Arkansas - Department of Computer Science and Computer Engineering Fragments Fragments Fragment A behavior or a portion of a user

More information

Google Maps library requires v2.50 or above.

Google Maps library requires v2.50 or above. Google Maps library requires v2.50 or above. Google Maps library allows you to add Google maps to your application. This library requires Android 3+ and will only work on devices with Google Play service.

More information

CS378 -Mobile Computing. Maps

CS378 -Mobile Computing. Maps CS378 -Mobile Computing Maps Using Google Maps Like other web services requires an API key from Google http://code.google.com/android/addons/google-apis/mapkey.html required to use MapViews Must: Register

More information

Programming with Android: Geo-localization and Google Map Services. Luca Bedogni. Dipartimento di Scienze dell Informazione Università di Bologna

Programming with Android: Geo-localization and Google Map Services. Luca Bedogni. Dipartimento di Scienze dell Informazione Università di Bologna Programming with Android: Geo-localization and Google Map Services Luca Bedogni Dipartimento di Scienze dell Informazione Università di Bologna Outline Geo-localization techniques Location Listener and

More information

From time to time Google changes the way it does things, and old tutorials may not apply to some new procedures.

From time to time Google changes the way it does things, and old tutorials may not apply to some new procedures. From time to time Google changes the way it does things, and old tutorials may not apply to some new procedures. This is another tutorial which, in about 6 months, will probably be irrelevant. But until

More information

Introduction To Android

Introduction To Android Introduction To Android Mobile Technologies Symbian OS ios BlackBerry OS Windows Android Introduction to Android Android is an operating system for mobile devices such as smart phones and tablet computers.

More information

Android Application Development using Kotlin

Android Application Development using Kotlin Android Application Development using Kotlin 1. Introduction to Kotlin a. Kotlin History b. Kotlin Advantages c. How Kotlin Program Work? d. Kotlin software Prerequisites i. Installing Java JDK and JRE

More information

Mobile Application Development Google Maps Android API

Mobile Application Development Google Maps Android API Mobile Application Development Google Maps Android API Waterford Institute of Technology October 17, 2016 John Fitzgerald Waterford Institute of Technology, Mobile Application Development Google Maps Android

More information

Mobila applikationer och trådlösa nät

Mobila applikationer och trådlösa nät Mobila applikationer och trådlösa nät HI1033 Lecture 8 Today s topics Location Based Services Google Maps API MultiMedia Location Based Services LocationManager provides access to location based services

More information

XML Tutorial. NOTE: This course is for basic concepts of XML in line with our existing Android Studio project.

XML Tutorial. NOTE: This course is for basic concepts of XML in line with our existing Android Studio project. XML Tutorial XML stands for extensible Markup Language. XML is a markup language much like HTML used to describe data. XML tags are not predefined in XML. We should define our own Tags. Xml is well readable

More information

BlackBerry Developer Global Tour. Android. Table of Contents

BlackBerry Developer Global Tour. Android. Table of Contents BlackBerry Developer Global Tour Android Table of Contents Page 2 of 55 Session - Set Up the BlackBerry Dynamics Development Environment... 5 Overview... 5 Compatibility... 5 Prepare for Application Development...

More information

Obtaining a Google Maps API Key. v1.0. By GoNorthWest. 15 December 2011

Obtaining a Google Maps API Key. v1.0. By GoNorthWest. 15 December 2011 Obtaining a Google Maps API Key v1.0 By GoNorthWest 15 December 2011 If you are creating an Android application that uses maps in it (which is a very cool feature to have!), you re going to need a Google

More information

Android development. Outline. Android Studio. Setting up Android Studio. 1. Set up Android Studio. Tiberiu Vilcu. 2.

Android development. Outline. Android Studio. Setting up Android Studio. 1. Set up Android Studio. Tiberiu Vilcu. 2. Outline 1. Set up Android Studio Android development Tiberiu Vilcu Prepared for EECS 411 Sugih Jamin 15 September 2017 2. Create sample app 3. Add UI to see how the design interface works 4. Add some code

More information

Monday schedule on Tuesday Great time to work with team on Course Project

Monday schedule on Tuesday Great time to work with team on Course Project Upcoming Assignments Code Review due Tuesday, February 16 2:10pm Pre-alpha version due Wednesday, February 17 Lab 5 due Monday, February 22 Read Chapter 7 (Quiz next Friday) Read article by Friday (Disaster

More information

UNDERSTANDING ACTIVITIES

UNDERSTANDING ACTIVITIES Activities Activity is a window that contains the user interface of your application. An Android activity is both a unit of user interaction - typically filling the whole screen of an Android mobile device

More information

Real-Time Embedded Systems

Real-Time Embedded Systems Real-Time Embedded Systems DT8025, Fall 2016 http://goo.gl/azfc9l Lecture 8 Masoumeh Taromirad m.taromirad@hh.se Center for Research on Embedded Systems School of Information Technology 1 / 51 Smart phones

More information

Embedded Systems Programming - PA8001

Embedded Systems Programming - PA8001 Embedded Systems Programming - PA8001 http://goo.gl/ydeczu Lecture 8 Mohammad Mousavi m.r.mousavi@hh.se Center for Research on Embedded Systems School of Information Science, Computer and Electrical Engineering

More information

1. Implementation of Inheritance with objects, methods. 2. Implementing Interface in a simple java class. 3. To create java class with polymorphism

1. Implementation of Inheritance with objects, methods. 2. Implementing Interface in a simple java class. 3. To create java class with polymorphism ANDROID TRAINING COURSE CONTENT SECTION 1 : INTRODUCTION Android What it is? History of Android Importance of Java language for Android Apps Other mobile OS-es Android Versions & different development

More information

Login with Amazon. Getting Started Guide for Android apps

Login with Amazon. Getting Started Guide for Android apps Login with Amazon Getting Started Guide for Android apps Login with Amazon: Getting Started Guide for Android Copyright 2017 Amazon.com, Inc., or its affiliates. All rights reserved. Amazon and the Amazon

More information

Building MyFirstApp Android Application Step by Step. Sang Shin Learn with Passion!

Building MyFirstApp Android Application Step by Step. Sang Shin   Learn with Passion! Building MyFirstApp Android Application Step by Step. Sang Shin www.javapassion.com Learn with Passion! 1 Disclaimer Portions of this presentation are modifications based on work created and shared by

More information

INTRODUCTION TO ANDROID

INTRODUCTION TO ANDROID INTRODUCTION TO ANDROID 1 Niv Voskoboynik Ben-Gurion University Electrical and Computer Engineering Advanced computer lab 2015 2 Contents Introduction Prior learning Download and install Thread Android

More information

Mobile Programming Lecture 2. Layouts, Widgets, Toasts, and Event Handling

Mobile Programming Lecture 2. Layouts, Widgets, Toasts, and Event Handling Mobile Programming Lecture 2 Layouts, Widgets, Toasts, and Event Handling Lecture 1 Review How to edit XML files in Android Studio? What holds all elements (Views) that appear to the user in an Activity?

More information

Mobile and Ubiquitous Computing: Android Programming (part 3)

Mobile 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 information

Android Programming Lecture 9: Two New Views 9/30/2011

Android Programming Lecture 9: Two New Views 9/30/2011 Android Programming Lecture 9: Two New Views 9/30/2011 ListView View Using ListViews is very much like using Spinners Build off an array of data Events on the list happen at a particular position ListView

More information

Create new Android project in Android Studio Add Button and TextView to layout Learn how to use buttons to call methods. Modify strings.

Create new Android project in Android Studio Add Button and TextView to layout Learn how to use buttons to call methods. Modify strings. Hello World Lab Objectives: Create new Android project in Android Studio Add Button and TextView to layout Learn how to use buttons to call methods. Modify strings.xml What to Turn in: The lab evaluation

More information

Mobile Programming Lecture 1. Getting Started

Mobile Programming Lecture 1. Getting Started Mobile Programming Lecture 1 Getting Started Today's Agenda About the Android Studio IDE Hello, World! Project Android Project Structure Introduction to Activities, Layouts, and Widgets Editing Files in

More information

IEMS 5722 Mobile Network Programming and Distributed Server Architecture

IEMS 5722 Mobile Network Programming and Distributed Server Architecture Department of Information Engineering, CUHK MScIE 2 nd Semester, 2016/17 IEMS 5722 Mobile Network Programming and Distributed Server Architecture Lecture 12 Advanced Android Programming Lecturer: Albert

More information

ANDROID APPS (NOW WITH JELLY BEANS!) Jordan Jozwiak November 11, 2012

ANDROID APPS (NOW WITH JELLY BEANS!) Jordan Jozwiak November 11, 2012 ANDROID APPS (NOW WITH JELLY BEANS!) Jordan Jozwiak November 11, 2012 AGENDA Android v. ios Design Paradigms Setup Application Framework Demo Libraries Distribution ANDROID V. IOS Android $25 one-time

More information

Wireless Vehicle Bus Adapter (WVA) Android Library Tutorial

Wireless Vehicle Bus Adapter (WVA) Android Library Tutorial Wireless Vehicle Bus Adapter (WVA) Android Library Tutorial Revision history 90001431-13 Revision Date Description A October 2014 Original release. B October 2017 Rebranded the document. Edited the document.

More information

Lab 1: Getting Started With Android Programming

Lab 1: Getting Started With Android Programming Islamic University of Gaza Faculty of Engineering Computer Engineering Dept. Eng. Jehad Aldahdooh Mobile Computing Android Lab Lab 1: Getting Started With Android Programming To create a new Android Project

More information

Presented by: Megan Bishop & Courtney Valentine

Presented by: Megan Bishop & Courtney Valentine Presented by: Megan Bishop & Courtney Valentine Early navigators relied on landmarks, major constellations, and the sun s position in the sky to determine latitude and longitude Now we have location- based

More information

Produced by. Mobile Application Development. Eamonn de Leastar

Produced by. Mobile Application Development. Eamonn de Leastar Mobile Application Development Produced by Eamonn de Leastar (edeleastar@wit.ie) Department of Computing, Maths & Physics Waterford Institute of Technology http://www.wit.ie http://elearning.wit.ie A First

More information

University of Stirling Computing Science Telecommunications Systems and Services CSCU9YH: Android Practical 1 Hello World

University of Stirling Computing Science Telecommunications Systems and Services CSCU9YH: Android Practical 1 Hello World University of Stirling Computing Science Telecommunications Systems and Services CSCU9YH: Android Practical 1 Hello World Before you do anything read all of the following red paragraph! For this lab you

More information

Getting Started with Android Development Zebra Android Link-OS SDK Android Studio

Getting Started with Android Development Zebra Android Link-OS SDK Android Studio Getting Started with Android Development Zebra Android Link-OS SDK Android Studio Overview This Application Note describes the end-to-end process of designing, packaging, deploying and running an Android

More information

COMP4521 EMBEDDED SYSTEMS SOFTWARE

COMP4521 EMBEDDED SYSTEMS SOFTWARE COMP4521 EMBEDDED SYSTEMS SOFTWARE LAB 1: DEVELOPING SIMPLE APPLICATIONS FOR ANDROID INTRODUCTION Android is a mobile platform/os that uses a modified version of the Linux kernel. It was initially developed

More information

LECTURE NOTES OF APPLICATION ACTIVITIES

LECTURE NOTES OF APPLICATION ACTIVITIES Department of Information Networks The University of Babylon LECTURE NOTES OF APPLICATION ACTIVITIES By College of Information Technology, University of Babylon, Iraq Samaher@inet.uobabylon.edu.iq The

More information

(Refer Slide Time: 1:12)

(Refer Slide Time: 1:12) Mobile Computing Professor Pushpendra Singh Indraprastha Institute of Information Technology Delhi Lecture 06 Android Studio Setup Hello, today s lecture is your first lecture to watch android development.

More information

12 Publishing Android Applications

12 Publishing Android Applications 12 Publishing Android Applications WHAT YOU WILL LEARN IN THIS CHAPTER How to prepare your application for deployment Exporting your application as an APK fi le and signing it with a new certificate How

More information

External 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 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 information

Understand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml

Understand applications and their components. activity service broadcast receiver content provider intent AndroidManifest.xml Understand applications and their components activity service broadcast receiver content provider intent AndroidManifest.xml Android Application Written in Java (it s possible to write native code) Good

More information

Signing For Development/Debug

Signing For Development/Debug Signing Android Apps v1.0 By GoNorthWest 15 December 2011 If you are creating an Android application, Google requires that those applications are signed with a certificate. This signing process is significantly

More information

Programming Concepts and Skills. Creating an Android Project

Programming Concepts and Skills. Creating an Android Project Programming Concepts and Skills Creating an Android Project Getting Started An Android project contains all the files that comprise the source code for your Android app. The Android SDK tools make it easy

More information

Android Beginners Workshop

Android Beginners Workshop Android Beginners Workshop at the M O B IL E M O N D AY m 2 d 2 D E V E L O P E R D A Y February, 23 th 2010 Sven Woltmann, AndroidPIT Sven Woltmann Studied Computer Science at the TU Ilmenau, 1994-1999

More information

Q.1 Explain the dialog and also explain the Demonstrate working dialog in android.

Q.1 Explain the dialog and also explain the Demonstrate working dialog in android. Q.1 Explain the dialog and also explain the Demonstrate working dialog in android. - A dialog is a small window that prompts the user to make a decision or enter additional information. - A dialog does

More information

Hello World. Lesson 1. Create your first Android. Android Developer Fundamentals. Android Developer Fundamentals

Hello World. Lesson 1. Create your first Android. Android Developer Fundamentals. Android Developer Fundamentals Hello World Lesson 1 1 1.1 Create Your First Android App 2 Contents Android Studio Creating "Hello World" app in Android Studio Basic app development workflow with Android Studio Running apps on virtual

More information

Mensch-Maschine-Interaktion 2 Übung 12

Mensch-Maschine-Interaktion 2 Übung 12 Mensch-Maschine-Interaktion 2 Übung 12 Ludwig-Maximilians-Universität München Wintersemester 2010/2011 Michael Rohs 1 Preview Android Development Tips Location-Based Services and Maps Media Framework Android

More information

Mobile Programming Lecture 5. Composite Views, Activities, Intents and Filters

Mobile 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 information

Getting Started With Android Feature Flags

Getting Started With Android Feature Flags Guide Getting Started With Android Feature Flags INTRO When it comes to getting started with feature flags (Android feature flags or just in general), you have to understand that there are degrees of feature

More information

Fragments were added to the Android API in Honeycomb, API 11. The primary classes related to fragments are: android.app.fragment

Fragments were added to the Android API in Honeycomb, API 11. The primary classes related to fragments are: android.app.fragment FRAGMENTS Fragments An activity is a container for views When you have a larger screen device than a phone like a tablet it can look too simple to use phone interface here. Fragments Mini-activities, each

More information

ANDROID SYLLABUS. Advanced Android

ANDROID SYLLABUS. Advanced Android Advanced Android 1) Introduction To Mobile Apps I. Why we Need Mobile Apps II. Different Kinds of Mobile Apps III. Briefly about Android 2) Introduction Android I. History Behind Android Development II.

More information

Activities. https://developer.android.com/guide/components/activities.html Repo: https://github.com/karlmorris/basicactivities

Activities. https://developer.android.com/guide/components/activities.html Repo: https://github.com/karlmorris/basicactivities Activities https://developer.android.com/guide/components/activities.html Repo: https://github.com/karlmorris/basicactivities Overview What is an Activity Starting and stopping activities The Back Stack

More information

CMSC436: Fall 2013 Week 3 Lab

CMSC436: 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 information

Android Programming - Jelly Bean

Android Programming - Jelly Bean 1800 ULEARN (853 276) www.ddls.com.au Android Programming - Jelly Bean Length 5 days Price $4235.00 (inc GST) Overview This intensive, hands-on five-day course teaches programmers how to develop activities,

More information

CS 234/334 Lab 1: Android Jump Start

CS 234/334 Lab 1: Android Jump Start CS 234/334 Lab 1: Android Jump Start Distributed: January 7, 2014 Due: Friday, January 10 or Monday, January 13 (in-person check off in Mobile Lab, Ry 167). No late assignments. Introduction The goal of

More information

TomTom Mobile SDK QuickStart Guide

TomTom Mobile SDK QuickStart Guide TomTom Mobile SDK QuickStart Guide Table of Contents Introduction... 3 Migrate to TomTom ios... 4 Prerequisites...4 Initializing a map...4 Displaying a marker...4 Displaying traffic...5 Displaying a route/directions...5

More information

PILOT FM Radio SDK AUGUST 31, 2016

PILOT FM Radio SDK AUGUST 31, 2016 PILOT FM Radio SDK Android Integration Guide Document version 1.0.3 Applies to: SDK Version 1.0.3 This document is intended to be used in conjunction with the sample app provided. AUGUST 31, 2016 PILOT

More information

Getting Started. Dr. Miguel A. Labrador Department of Computer Science & Engineering

Getting 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 information

MODULE 2: GETTING STARTED WITH ANDROID PROGRAMMING

MODULE 2: GETTING STARTED WITH ANDROID PROGRAMMING This document can be downloaded from www.chetanahegde.in with most recent updates. 1 MODULE 2: GETTING STARTED WITH ANDROID PROGRAMMING Syllabus: What is Android? Obtaining the required tools, Anatomy

More information

EMBEDDED SYSTEMS PROGRAMMING Application Basics

EMBEDDED SYSTEMS PROGRAMMING Application Basics EMBEDDED SYSTEMS PROGRAMMING 2015-16 Application Basics APPLICATIONS Application components (e.g., UI elements) are objects instantiated from the platform s frameworks Applications are event driven ( there

More information

Historical Places in MAHARASTRA

Historical Places in MAHARASTRA Historical Places in MAHARASTRA Objective: Our state MAHARASTRA is rich in history and culture. This fact is known from ages. But many of us residing in Maharashtra are actually un-aware of its culture

More information

Have a development environment in 256 or 255 Be familiar with the application lifecycle

Have a development environment in 256 or 255 Be familiar with the application lifecycle Upcoming Assignments Readings: Chapter 4 by today Horizontal Prototype due Friday, January 22 Quiz 2 today at 2:40pm Lab Quiz next Friday during lecture time (2:10-3pm) Have a development environment in

More information

CS371m - Mobile Computing. Persistence - Web Based Storage CHECK OUT g/sync-adapters/index.

CS371m - Mobile Computing. Persistence - Web Based Storage CHECK OUT   g/sync-adapters/index. CS371m - Mobile Computing Persistence - Web Based Storage CHECK OUT https://developer.android.com/trainin g/sync-adapters/index.html The Cloud. 2 Backend No clear definition of backend front end - user

More information

ATC Android Application Development

ATC Android Application Development ATC Android Application Development 1. Android Framework and Android Studio b. Android Platform Architecture i. Linux Kernel ii. Hardware Abstraction Layer(HAL) iii. Android runtime iv. Native C/C++ Libraries

More information

Introduction to Android development

Introduction to Android development Introduction to Android development Manifesto Digital We re an award winning London based digital agency that loves ideas design and technology We aim to make people s lives better, easier, fairer, more

More information

Lecture 7: Data Persistence : shared preferences. Lecturer : Ali Kadhim Al-Bermani Mobile Fundamentals and Programming

Lecture 7: Data Persistence : shared preferences. Lecturer : Ali Kadhim Al-Bermani Mobile Fundamentals and Programming University of Babylon College of Information Technology Department of Information Networks Mobile Fundamentals and Programming Lecture 7: Data Persistence : shared preferences Lecturer : Ali Kadhim Al-Bermani

More information

Open Lecture Mobile Programming. Firebase Tools

Open Lecture Mobile Programming. Firebase Tools Open Lecture Mobile Programming Firebase Tools Agenda Setup Firebase Authentication Firebase Database Firebase Cloud Messaging Setting up a new Firebase project Navigate to https://console.firebase.google.com/

More information

Android App Development. Mr. Michaud ICE Programs Georgia Institute of Technology

Android 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 information

Android Programming Lecture 8: Activities, Odds & Ends, Two New Views 9/28/2011

Android Programming Lecture 8: Activities, Odds & Ends, Two New Views 9/28/2011 Android Programming Lecture 8: Activities, Odds & Ends, Two New Views 9/28/2011 Return Values from Activities: Callee Side How does the Sub-Activity send back a response? Create an Intent to return Stuff

More information

Android. Mobile operating system developed by Google A complete stack. Based on the Linux kernel Open source under the Apache 2 license

Android. 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 information

Lifecycle Callbacks and Intents

Lifecycle Callbacks and Intents SE 435: Development in the Android Environment Recitations 2 3 Semester 1 5779 4 Dec - 11 Dec 2018 Lifecycle Callbacks and Intents In this recitation we ll prepare a mockup tool which demonstrates the

More information

getcount getitem getitemid getview com.taxi Class MainActivity drawerlayout drawerleft drawerright...

getcount getitem getitemid getview com.taxi Class MainActivity drawerlayout drawerleft drawerright... Contents com.taxi.ui Class CallDialog... 3 CallDialog... 4 show... 4 build... 5 com.taxi.custom Class CustomActivity... 5 TOUCH... 6 CustomActivity... 6 onoptionsitemselected... 6 onclick... 6 com.taxi.model

More information

Android File & Storage

Android File & Storage Files Lecture 9 Android File & Storage Android can read/write files from two locations: Internal (built into the device) and external (an SD card or other drive attached to device) storage Both are persistent

More information

ArcGIS Runtime SDK for Android: Building Apps. Shelly Gill

ArcGIS Runtime SDK for Android: Building Apps. Shelly Gill ArcGIS Runtime SDK for Android: Building Apps Shelly Gill Agenda Getting started API - Android Runtime SDK patterns - Common functions, workflows The Android platform Other sessions covered Runtime SDK

More information

Upon completion of the second part of the lab the students will have:

Upon 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 information

Android Activities. Akhilesh Tyagi

Android Activities. Akhilesh Tyagi Android Activities Akhilesh Tyagi Apps, memory, and storage storage: Your device has apps and files installed andstoredonitsinternaldisk,sdcard,etc. Settings Storage memory: Some subset of apps might be

More information

Lab 3: Using Worklight Server and Environment Optimization Lab Exercise

Lab 3: Using Worklight Server and Environment Optimization Lab Exercise Lab 3: Using Worklight Server and Environment Optimization Lab Exercise Table of Contents Lab 3 Using the Worklight Server and Environment Optimizations... 3-4 3.1 Building and Testing on the Android Platform...3-4

More information

CPET 565 Mobile Computing Systems CPET/ITC 499 Mobile Computing. Lab & Demo 2 (1 &2 of 3) Hello-Goodbye App Tutorial

CPET 565 Mobile Computing Systems CPET/ITC 499 Mobile Computing. Lab & Demo 2 (1 &2 of 3) Hello-Goodbye App Tutorial CPET 565 Mobile Computing Systems CPET/ITC 499 Mobile Computing Reference Lab & Demo 2 (1 &2 of 3) Tutorial Android Programming Concepts, by Trish Cornez and Richard Cornez, pubslihed by Jones & Barlett

More information

Syllabus- Java + Android. Java Fundamentals

Syllabus- Java + Android. Java Fundamentals Introducing the Java Technology Syllabus- Java + Android Java Fundamentals Key features of the technology and the advantages of using Java Using an Integrated Development Environment (IDE) Introducing

More information

Mobile Programming Lecture 3. Resources, Selection, Activities, Intents

Mobile 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 information

Overview of Activities

Overview of Activities 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 Programming

More information

Applied Cognitive Computing Fall 2016 Android Application + IBM Bluemix (Cloudant NoSQL DB)

Applied 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 information

Mobile Application Development

Mobile Application Development Mobile Application Development MTAT.03.262 Jakob Mass jakob.mass@ut.ee Goal Give you an idea of how to start developing mobile applications for Android Introduce the major concepts of Android applications,

More information

Diving into Android. By Jeroen Tietema. Jeroen Tietema,

Diving 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 information

Android Syllabus. Android. Android Overview and History How it all get started. Why Android is different.

Android Syllabus. Android. Android Overview and History How it all get started. Why Android is different. Overview and History How it all get started. Why is different. Syllabus Stack Overview of the stack. Linux kernel. Native libraries. Dalvik. App framework. Apps. SDK Overview Platforms. Tools & Versions.

More information

Geo Catching Sprint #3 Kick-off

Geo Catching Sprint #3 Kick-off LP IDSE - GL Geo Catching Sprint #3 Kick-off 03/01/2017 Cécile Camillieri/Clément Duffau 1 GeoCatching sprint #1 Drawing of zones on a map User login and joining of a game Browser-based geolocation of

More information

COSC 3P97 Mobile Computing

COSC 3P97 Mobile Computing COSC 3P97 Mobile Computing Mobile Computing 1.1 COSC 3P97 Prerequisites COSC 2P13, 3P32 Staff instructor: Me! teaching assistant: Steve Tkachuk Lectures (MCD205) Web COSC: http://www.cosc.brocku.ca/ COSC

More information

Android Development Crash Course

Android Development Crash Course Android Development Crash Course Campus Sundsvall, 2015 Stefan Forsström Department of Information and Communication Systems Mid Sweden University, Sundsvall, Sweden OVERVIEW The Android Platform Start

More information

Solving an Android Threading Problem

Solving 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 information

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi

ACTIVITY, FRAGMENT, NAVIGATION. Roberto Beraldi ACTIVITY, FRAGMENT, NAVIGATION Roberto Beraldi Introduction An application is composed of at least one Activity GUI It is a software component that stays behind a GUI (screen) Activity It runs inside the

More information

Table of Contents HOL-1757-MBL-5

Table of Contents HOL-1757-MBL-5 Table of Contents Lab Overview - - VMware AirWatch: Mobile App Management and App Development... 2 Lab Guidance... 3 Module 1 - Introduction to AppConfig (30 minutes)... 8 Login to the AirWatch Console...

More information

Overview. Android Apps (Partner s App) Other Partner s App Platform. Samsung Health. Server SDK. Samsung Health. Samsung Health Server

Overview. Android Apps (Partner s App) Other Partner s App Platform. Samsung Health. Server SDK. Samsung Health. Samsung Health Server W E L C O M E T O Overview Android Apps (Partner s App) Data Service Health Android SDK Android API Samsung Health Samsung Health Server SDK Data REST API Oauth2 Other Partner s App Platform REST API

More information

CS378 -Mobile Computing. Anatomy of and Android App and the App Lifecycle

CS378 -Mobile Computing. Anatomy of and Android App and the App Lifecycle CS378 -Mobile Computing Anatomy of and Android App and the App Lifecycle Hello Android Tutorial http://developer.android.com/resources/tutorials/hello-world.html Important Files src/helloandroid.java Activity

More information