David Meredith dave@create.aau.dk Sphero David Meredith dave@create.aau.dk.

Slides:



Advertisements
Similar presentations
Android Application Development Tutorial. Topics Lecture 4 Overview Overview of Sensors Programming Tutorial 1: Tracking location with GPS and Google.
Advertisements

Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Scienze dellInformazione Università di Bologna.
Bruce Scharlau, University of Aberdeen, 2010 Android and Location Mobile Computing Unless otherwise stated, images are from android sdk.
Ando-it-yourself droid Praveen Kumar Pendyala. Outline Brief intro to the Droid developement Setting up the Life saviors - Development tools Hello Droid.
ANDROID DEVELOPMENT KELLY MCBEAN. DEVELOPMENT ENVIRONMENT OVERVIEW Eclipse Standard IDE for Developing Android Applications Install: 1.Java (JDK) – Since.
Samsung Smart TV is a web-based application running on an application engine installed on digital TVs connected to the Internet.
Android OS : Core Concepts Dr. Jeyakesavan Veerasamy Sr. Lecturer University of Texas at Dallas
1. What is Essex Scheduler? 2. Why Android? 3. Software design 4. Application graphics 5. Releasing to Google Play 6. Application maintenance Essex Scheduler.
CE881: Mobile and Social Application Programming Simon M. Lucas Menus and Dialogs.
Processing and Java David Meredith
Cosc 5/4730 Android Maps v2. Maps V1 and V2 In March 2013 google removed the ability to get a map key for version 1. Version 2 had been introduced in.
Intro to Android Development. Getting started 1.Install Android SDK (includes Eclipse; 2.If using Windows.
Programming with Android: SDK install and initial setup Luca Bedogni Marco Di Felice Dipartimento di Informatica: Scienza e Ingegneria Università di Bologna.
Real World Development using OpenEdge Mobile – some advanced features Brian C. Preece Ypsilon Software Ltd
The Android Development Environment.  Getting started on the Android Platform  Installing required libraries  Programming Android using the Eclipse.
1 Mobile Computing Mobile First (formerly Worklight) Copyright 2015 by Janson Industries.
Android: Hello World Frank Xu Gannon University. Steps Configuration ▫Android SDK ▫Android Development Tools (ADT)  Eclipse plug-in ▫Android SDK and.
Google Android as a mobile development platform T Internet Technologies for Mobile Computing Olli Mäkinen.
By: James Ondecko  What is Android?  Helpful backgrounds for Android development  Tools & Installs  Android Virtual Devices  Helpful references.
Android Programming Beomjoo Seo Sep., 12 CS5248 Fall 2012.
ANDROID PROGRAMMING MODULE 1 – GETTING STARTED
UFCFX5-15-3Mobile Device Development Android Development Environments and Windows.
SET UP COMPUTER ** PLEASE BE AWARE SCREENSHOTS MAY NOT MATCH **
INTERNATIONAL SUMMER ACADEMIC COURSE UNIVESITY OF NIS ISAC – Android programming.
Android Programming. Outline Preparation Create new project Build and Run a project Debug a project Deploy on devices.
Programming Your Android App Gourav Khadge
Android Boot Camp for Developers Using Java, Comprehensive: A Guide to Creating Your First Android Apps Chapter 9: Customize! Navigating with a Master/Detail.
Android: versions Note that: Honeycomb (Android v3.0) A tablet-only release Jelly Bean (Android v4.1) Released on July 09, 2012.
© Keren Kalif Intro to Android Development Written by Keren Kalif, Edited by Liron Blecher Contains slides from Google I/O presentation.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Concurrency in Android with.
Android Programming By Mohsen Biglari Android Programming, Part1: Introduction 1 Part1: Introduction By Mohsen Biglari.
Operating system for mobile devices with a Java programming interface. Provides tools, e.g. a compiler, debugger, device emulator, and its own Java Virtual.
Android Info mostly based on Pro Android 3.  User Applications  Java Libraries – most of Java standard edition ◦ Activities/Services ◦ UI/Graphics/View.
PARSING FACEBOOK DATA FOR ANDROID 1. Step by Step  Import Android SDK  Get the hash key  Create a new app  Create a new project in Eclipse 
Testing with Android Part I of II. Android Testing Framework Based on JUnit The Android JUnit extensions provide component-specific test case classes.
Intro to Android Development Ben Lafreniere. Getting up and running Don’t use the VM! ials/hello-world.html.
Introduction to Android Android How to Program © by Pearson Education, Inc. All Rights Reserved.
Introduction to Android. Android as a system, is a java based operating system that runs on the Linux kernel. The system is very lightweight and full.
Capture and Replay Often used for regression test development –Tool used to capture interactions with the system under test. –Inputs must be captured;
Basic Android Tutorial USF’s Association for Computing Machinery.
DUE Hello World on the Android Platform.
16 Services and Broadcast Receivers CSNB544 Mobile Application Development Thanks to Utexas Austin.
Presented By: Muhammad Tariq Software Engineer Android Training course.
Android Boot Camp for Developers Using Java, 3E
Creating an Example Android App in Android Studio Activity lifecycle & UI Resources.
Liferay Installation Prepared by: Do Xuan Hai 8 August 2011.
First Venture into the Android World Chapter 1 Part 2.
 Installation of Android Development Environment  Creating the App with OpenGL ES API  Running the App on Emulator Android App Development.
HW#9 Clues CSCI 571 Fall, HW#9 Prototype
ANDROID APPLICATION DEVELOPMENT. ANDROID DEVELOPMENT DEVELOPER.ANDROID.COM/INDEX.HTML THE OFFICIAL SITE FOR ANDROID DEVELOPERS. PROVIDES THE ANDROID SDK.
TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents.
TCS Internal Maps. 2 TCS Internal Objective Objective :  MAPS o Integration of Maps.
© 2016 Cengage Learning®. May not be scanned, copied or duplicated, or posted to a publicly accessible website, in whole or in part. Android Boot Camp.
Android apps development - Eclipse, Android SDK, and ADT plugin Introduction of.
Introduction to Android Programming
Mobile Device Development
Android 01: Fundamentals
Obtaining the Required Tools
Android Studio, Android System Basics and Git
Mobile Application Development BSCS-7 Lecture # 6
Activities and Intents
Development-Introduction
Sensors, maps and fragments:
Anatomy of an Android Application
Android SDK & App Development
The Most Popular Android UI Automation Testing Tool Andrii Voitenko
Android Application Development
Working with Libraries
Presentation transcript:

David Meredith dave@create.aau.dk Sphero David Meredith dave@create.aau.dk

Source http://developer.gosphero.com/ https://github.com/orbotix/Sphero-Android-SDK

Getting started Install the Android Development Tools Bundle for your system http://developer.android.com/sdk/index.html Download the latest version of the Sphero Android SDK https://github.com/orbotix/Sphero-Android-SDK/zipball/master

Importing the Sphero SDK sample programs Good place to start is to import the SDK sample programs into a new workspace in the ADT version of Eclipse

Importing SDK samples into Eclipse

Samples AchievementActivity – basics of adding achievements to SpheroWorld ButtonDriveActivity – demonstrates driving a sphero using buttons CollisionsActivity – demonstrates how to use the Sphero firmware collision detection system HelloWorldActivity – shows how to connect a Sphero and blink its LED LocatorActivity – shows how to use the firmware Locator feature to provide real-time position and velocity information MacroLoader – shows how to import MacroLab macros into your app MacroSample – how to programmatically create macros and run them on multiple Spheros OptionsFlagActivity – shows how to set option flags (e.g., to keep the tail light on) OrbBasicActivity – how to load and execute OrbBasic programs on the Sphero itself SelfLevelActivity – demonstrates self-level feature (attempts to gain horizontal orientation) StreamingActivity – shows streaming of sensor data from sphero to Android device StreamingAnimationActivity – using Sphero streaming data to control motion of a sprite around the screen TeaPotActivity – uses IMU values to control orientation of a Teapot image on the screen UiSampleActivity – Using the StartupActivity instead of the SpheroConnectionView

Creating a Sphero project from scratch Create an Android application project

Setting API levels and Java compliance Ensure Android API level 8 (Android 2.2) or greater in AndroidManifest.xml Java language compliance level 6.0 (1.6) or higher

Integrating the Sphero libraries Add the Sphero libraries to the libs folder in the library/libs/ folder in the SDK Eclipse should automatically add RobotLibrary.jar to the Android dependencies folder

Adding bluetooth permissions to the manifest file Add permissions to the Android manifest file to allow the app to use Bluetooth Make sure you have bluetooth on in the device settings!

Connecting to a Sphero RobotLibrary contains a View called SpheroConnectionView Fires off an onRobotConnected event when a robot is connected Need to add SpheroConnectionView to the Activity’s xml layout file (see above) SpheroConnectionView should be the last defined view in a FrameLayout Makes sure that when you hide it (after a Sphero has connected) the rest of your UI becomes available

Connecting to a Sphero – overriding onResume() Must attach an OnRobotConnectionEventListener to the spheroConnectionView object defines what happens when a Sphero is connected using the SpheroConnectionView Should hide SpheroConnectionView when a Sphero becomes connected i.e., onRobotConnected is called

Shutting down the Sphero connection Override Activity’s onStop method in order to disconnect Sphero and return it to its default stable state shutting down SpheroConnectionView important if user does not enable bluetooth!

Blink the LED Sphero commands are carried in subclasses of the DeviceCommand class Sent to the Sphero using the DeviceMessenger singleton DeviceCommand.sendCommand() method posts a message to the DeviceMessenger

Sending commands to the Sphero