As it relates to Android Studio. By Phil Malone: phil.malone@mr-phil.com



Similar documents
New Technology Introduction: Android Studio with PushBot

FTC Android Based Control System

DRAFT COPY: CONTENTS SUBJECT TO CHANGE. FTC Training Manual. JAVA Programming for the Next Gen Controller. FIRST Tech Challenge 8/3/2015

Next Gen Platform: Team & Mentor Guide

New Technology Introduction: MIT App Inventor

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

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

Board also Supports MicroBridge

Running a Program on an AVD

How To Develop Android On Your Computer Or Tablet Or Phone

Example Connection between USB Host and Android

Introduction to Android Programming (CS5248 Fall 2015)

Develop a Hello World project in Android Studio Capture, process, store, and display an image. Other sensors on Android phones

Course Project Documentation

Getting started with Android and App Engine

Fahim Uddin 1. Java SDK

Mobile and Social Computing

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

Allow Installation from Unknown Sources

Integration Overview. Web Services and Single Sign On

Intel Integrated Native Developer Experience (INDE): IDE Integration for Android*

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

Developing with Android Studio

Islamic University of Gaza. Faculty of Engineering. Computer Engineering Department. Mobile Computing ECOM Eng. Wafaa Audah.

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

CS 528 Mobile and Ubiquitous Computing Lecture 2: Android Introduction and Setup. Emmanuel Agu

ANDROID LEVERED DATA MONITORING ROBOT

Module Title: Software Development A: Mobile Application Development

Introduction to Gear VR Development in Unity APPENDIX A: SETUP (WINDOWS 7/8)

Lab 0 (Setting up your Development Environment) Week 1

Android Environment SDK

Unit 1: INTRODUCTION TO ADVANCED ROBOTIC DESIGN & ENGINEERING

Practical Android Projects Lucas Jordan Pieter Greyling

Title: Appium Automation for Mac OS X. Created By: Prithivirajan M. Abstract. Introduction

Android Application Development and Bluetooth Technology

Android Programming: Installation, Setup, and Getting Started

Mobility Introduction Android. Duration 16 Working days Start Date 1 st Oct 2013

How To Develop An Android App On An Android Device

A Practical Guide to creating, compiling and signing an Android Application using Processing for Android.

Android Geek Night. Application framework

CS378 -Mobile Computing. Android Overview and Android Development Environment

Download and Installation Instructions. Android SDK and Android Development Tools (ADT) Microsoft Windows

Reminders. Lab opens from today. Many students want to use the extra I/O pins on

ANDROID INTRODUCTION TO ANDROID

Build Automation for Mobile. or How to Deliver Quality Apps Continuously. Angelo Rüggeberg

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

Android Environment SDK

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

Android, Bluetooth and MIAC

Introduction to Sun ONE Application Server 7

The power of root on Android emulators

Robotium Automated Testing for Android

Mobile Development Documentation

How to Install Applications (APK Files) on Your Android Phone

Creating a 2D Game Engine for Android OS. Introduction

Introduction to Android

Introduction to Android Development. Jeff Avery CS349, Mar 2013

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

Introduction to Android. CSG250 Wireless Networks Fall, 2008

CSA Software Listing Table of Contents. Both Windows and Mac platforms are supported.

Introduction (Apps and the Android platform)

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

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

Setting up Sudoku example on Android Studio

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

TeamCity A Professional Solution for Delivering Quality Software, on Time

Oracle FLEXCUBE Direct Banking Android Tab Client Installation Guide Release

Set Up SOS Video Chat and Screen-Sharing

Android Setup Phase 2

DEVELOPING MOBILE APPLICATIONS USING ANDROID

Programming the VEX Robot

Appium mobile test automation

Android: Setup Hello, World: Android Edition. due by noon ET on Wed 2/22. Ingredients.

Lecture 3 Mobile App Development (Android, ios, BlackBerry, Windows Mobile) <lecturer, date>

IOIO for Android Beginners Guide Introduction

Running Android Applications on BlackBerry 10 developer.blackberry.com/android

Mobile App Design and Development

Training MIFARE SDK. Public. MobileKnowledge June 2015

Developing Android Applications Introduction to Software Engineering Fall Updated 7 October 2015

01. Introduction of Android

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

Liferay Portal 6.2. Key Features List

PrioVR Production Plan:

Setting Up Your Android Development Environment. For Mac OS X (10.6.8) v1.0. By GoNorthWest. 3 April 2012

DEPLOYING A VISUAL BASIC.NET APPLICATION

Chapter 12: Finale! Publishing Your Android App

Download and Installation Instructions. Android SDK and Android Development Tools (ADT)

How to Create an Android Application using Eclipse on Windows 7

Developing NFC Applications on the Android Platform. The Definitive Resource

Full version is >>> HERE <<<

With a single download, the ADT Bundle includes everything you need to begin developing apps:

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

COMPANIES REGISTRY. Third Party Software Interface Specification. (Part 1 Overview)

ROBOTC Software Inspection Guide with Additional Help Documentation

Tutorial on Basic Android Setup

Chapter 1. Introduction to ios Development. Objectives: Touch on the history of ios and the devices that support this operating system.

Introduction to Android Development

Transcription:

As it relates to Android Studio By Phil Malone: phil.malone@mr-phil.com

*Jargon, Jargon and More Jargon *Where to find tools/documentation *The Software Components *Driver Station *Robot Controller *The IDE *Downloading the Code Template *The anatomy of an OpMode *Creating your own OpMode *Deployment *Testing

*Gradle is a build automation tool that builds upon the concepts of Apache Ant and Apache Maven and introduces a Groovy-based domain-specific language (DSL) instead of the more traditional XML form of declaring the project configuration.

Android Mobile Phone Operating system, by Google. Multiple versions with ever growing capabilities. FTC uses Android 4.4.4 KitKat * App Application (program that runs on a mobile device) * IDE Integrated Development Environment. (Program for writing programs) * SDK Software Development Kit (Parts to help you build a program) Google SDK FTC SDK * API Application Programmer Interface (defines built-in program features) * Google API Defines built-in Google features * Android Studio An IDE for writing Java APPs for Android Phones * Project All the components that go into a specific application. * Gradle Used to build the application from its components.

Java A high-level text based programming language. A commonly used foundation for developing and delivering content on the Web. * Class A class is template for creating objects by which defines the object properties and behaviors. Java class objects exhibit the properties and behaviors defined by its class. A class can contain fields and methods to describe the behavior of an object. * Object Exhibit the properties and behaviors defined by its class. * Field Data stored within an object * Method Action that can be performed by/on an object. * Refractor Refactoring is the process of changing a software system in such a way that it does not alter the external behavior of the code yet improves its internal structure

ADB Android Debug Bridge (A means to deploy and test Apps) * Deploy Transfer an App to the Android Phone. (Can be done wired or wirelessly) * opmode An Operational Mode that defines how your robot will run during a single match period. One App contains multiple opmodes. These can be for driver control mode or autonomous. OpModes are selectable from the Driver Station, prior to the match starting.

*Your team will use Android Studios and the FTC SDK to write a custom App in Java. *You will build your app to utilize API 19 which supports the Android 4.4.4 Operating System (KitKat). *You will add one or more new classes in the form of custom opmodes. *You will use Gradle to build the App, and ADB to deploy it to the ZTE phone on your robot.

* Download Android Studios https://developer.android.com/sdk/index.html * Download FTC SDK https://github.com/ftctechnh/ftc_app * Phone Setup Video https://www.youtube.com/watch?v=n597u6rcl2y * Android Studio Help https://developer.android.com/training/index.html * FTC Help http://ftcforum.usfirst.org/forumdisplay.php?156-ftc-technology * /AndroidStudioProjects/ftc_app-master/docs (Installed with FTC SDK)

* A single App is created which contains all the possible robot operational modes (opmodes). * All of the typical App functionality is already included and locked down. * Methods are provided for accessing robot hardware and communicating between Driver Station. * The App attaches to the hardware using names that are set through an offline Configuration process. * Several sample opmodes are included, but need not be used. * New blank opmodes can be added, and then filled in with the desired behavior code. * opmodes provide several empty methods which should be overridden with new user code.

* init() Called once when the driver selects a new opmode and presses INIT * init_loop() Called repeatedly while waiting for driver to hit PLAY button. Robot hardware is updated between each call. * start() Called once when driver hits PLAY * loop() Called repeatedly while waiting for driver to hit STOP or for a timed match to complete. Robot hardware is updated between each call. * stop() Called once when the driver hits STOP or a timed match ends. * The code in each method should quickly do its job and then return.

*Init() is provided to enable robot setup before the match begins. *Devices should be looked up in the Hardware Map, and made accessible to the rest of the code. *One-time actions should be performed, like setting initial servo positions or starting a gyro calibration.

*Init_loop() is provided for ongoing pre-game setup. *Eg: For proceeding with a gyro calibration that takes several seconds, or any other action that s allowed by the rules prior to the start of the match.

*Start() is provided to set-up any initial match conditions. *This could be starting a game clock, or deciding on an autonomous action. *Start() can also work in combination with stop() to allocate/free program storage, or attach/detach from custom sensors.

*Loop() is the primary control loop. *Game controller and sensor inputs can be read, and motor/servo actions can be taken. *If special timing or sequential actions are required, one or more state machines may be required to manage those actions over several loop() calls.

*Stop() is provided to get the robot back to a safre mode. *It should be used to end any actions begun in loop() or close out any resources created in start().

* Strictly speaking you can get by putting code in just two of the methods. * init() for connecting with the sensors/motors by name. (provides a chance to detect bad names prior to running) * loop() for running the robot during the match. * Note: There is also a type of opmode called a linearopmode. This creates a new thread that lets you write your code in-line, but its capabilities and limitations were not well defined prior to kickoff. So we ll just stick with opmode. * Now let s look at the code