Saindo da zona de conforto resolvi aprender Android! by Daniel Baccin



Similar documents
Android Introduction. Hello Mihail L. Sichitiu 1

Creating a List UI with Android. Michele Schimd

Android App Development. Rameel Sethi

MAP524/DPS924 MOBILE APP DEVELOPMENT (ANDROID) MIDTERM TEST OCTOBER 2013 STUDENT NAME STUDENT NUMBER

Developing an Android App. CSC207 Fall 2014

Tutorial #1. Android Application Development Advanced Hello World App

Developing Android Apps: Part 1

Mobile Application Development

Android For Java Developers. Marko Gargenta Marakana

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

ANDROID AS A PLATFORM FOR DATABASE APPLICATION DEVELOPMENT

Report and Opinion 2014;6(7) Technical Specification for Creating Apps in Android. Kauser Hameed, Manal Elobaid

Building Your First App

Presenting Android Development in the CS Curriculum

Android-Entwicklung. Michael secure Stapelberg

SDK Quick Start Guide

Android Development. Marc Mc Loughlin

Create Your Own Android App Tools Using ArcGIS Runtime SDK for Android

Tutorial: Setup for Android Development

Android 多 核 心 嵌 入 式 多 媒 體 系 統 設 計 與 實 作

ADITION Android Ad SDK Integration Guide for App Developers

By sending messages into a queue, we can time these messages to exit the cue and call specific functions.

Università Degli Studi di Parma. Distributed Systems Group. Android Development. Lecture 2 Android Platform. Marco Picone

MMI 2: Mobile Human- Computer Interaction Android

Android Application Development. Yevheniy Dzezhyts

ELET4133: Embedded Systems. Topic 15 Sensors

TUTORIALS AND QUIZ ANDROID APPLICATION SANDEEP REDDY PAKKER. B. Tech in Aurora's Engineering College, 2013 A REPORT

Android Basics. Xin Yang

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

Android Services. Services

Android Development Tutorial. Human-Computer Interaction II (COMP 4020) Winter 2013

Chapter 2 Getting Started

Les fragments. Programmation Mobile Android Master CCI. Une application avec deux fragments. Premier layout : le formulaire

Developing Android Applications: Case Study of Course Design

Localization and Resources

Android Development Tutorial

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

2. Installieren des MySQL Workbench (Version ) 3. Unter Database > Manage Connection folgende Werte eintragen

ANDROID APP DEVELOPMENT: AN INTRODUCTION CSCI /19/14 HANNAH MILLER

Create Android apps that stand out from the crowd. Android. Best Practices. Godfrey Nolan Onur Cinar David Truxall

Les Broadcast Receivers...

Now that we have the Android SDK, Eclipse and Phones all ready to go we can jump into actual Android development.

Android Persistency: Files

App Development for Android. Prabhaker Matet

Basics. Bruce Crawford Global Solutions Manager

AN How to build a NFC Application on Android. Application note COMPANY PUBLIC. Rev September Document information

Based on Android 4.0. by Lars Vogel. Version 9.8. Copyright 2009, 2010, 2011, 2012 Lars Vogel Home Tutorials Trainings Books Social

Android Development for External Displays: A Busy Coder's Guide

4. The Android System

Android Programming Basics

Projet Android (LI260) Cours 4

ANDROID TUTORIAL. Simply Easy Learning by tutorialspoint.com. tutorialspoint.com

Android Application Development

The Android winds of change. From Kit-Kat to L, and the power of saving power

Getting Started With Android

Exemplo 12 usa fragmentos de acordo com a orientação da tela (landscape ou portrait)

Introduction to Android SDK Jordi Linares

Performance - Optimierung. mit und ohne Android Developer Tools. Dominik Helleberg

Woubshet Behutiye ANDROID ECG APPLICATION DEVELOPMENT

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

Android Java Live and In Action

B.M. Harwani. Android Programming UNLEASHED. 800 East 96th Street, Indianapolis, Indiana USA

Admin. Mobile Software Development Framework: Android Activity, View/ViewGroup, External Resources. Recap: TinyOS. Recap: J2ME Framework

Getting started with Android and App Engine

Location-Based Services Design and Implementation Using Android Platforms

Getting Started: Creating a Simple App

Android app development course

How to develop your own app

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

Android Application Development Course Program

Operating System Support for Inter-Application Monitoring in Android

Developing apps for Android OS: Develop an app for interfacing Arduino with Android OS for home automation

HERE SDK for Android. Developer's Guide. Online Version 2.1

Building an Android client. Rohit Nayak Talentica Software

A software stack for mobile devices:

ECWM511 MOBILE APPLICATION DEVELOPMENT Lecture 1: Introduction to Android

Xamarin Android Application Development

Android Programming. An Introduction. The Android Community and David Read. For the CDJDN April 21, 2011

PROJECT REPORT. Android Application

Android Programming: 2D Drawing Part 1: Using ondraw

Android app development course

@ME (About) Marcelo Cyreno. Skype: marcelocyreno Linkedin: marcelocyreno Mail:

ITG Software Engineering

Transcription:

Saindo da zona de conforto resolvi aprender Android! by Daniel Baccin

Mas por que Android???

Documentação excelente

Crescimento no número de apps

Fonte: http://www.statista.com/statistics/266210/number-of-available-applications-in-the-google-play-store/

Versões

Material Design

Resolvi aprender android!

Rápido resultado

336!!!

Para tudo eu imagino um app

Primeiros desafios

Estrutura do Projeto Classes JAVA

Estrutura do Projeto Recursos

Estrutura do Projeto AndroidManifest

Estrutura do Projeto Gradle

Conceitos básicos Activity XML de Layout AndroidManifest Intent

Conceitos básicos Activity XML de Layout AndroidManifest Intent

Activity Comportamento public class FormularioActivity extends Activity{ @Override protected void oncreate(bundle bundle) super.oncreate(bundle); setcontentview(r.layout.formulario); // fazer coisas legais aqui } } {

Activity Comportamento public class FormularioActivity extends Activity{ @Override protected void oncreate(bundle bundle) super.oncreate(bundle); setcontentview(r.layout.formulario); // fazer coisas legais aqui } } {

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal"> <ImageView android:id="@+id/icon_participante" android:layout_width="52px" android:layout_height="52px" android:src="@drawable/ic_action_accept"/> <TextView android:id="@+id/lista_aluno_nome" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textsize="60px" android:textcolor="@color/black"/> </LinearLayout> XML de Layout Aparência

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal"> <ImageView android:id="@+id/icon_participante" android:layout_width="52px" android:layout_height="52px" android:src="@drawable/ic_action_accept"/> <TextView android:id="@+id/lista_aluno_nome" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textsize="60px" android:textcolor="@color/black"/> </LinearLayout> XML de Layout Aparência

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="horizontal"> <ImageView android:id="@+id/icon_participante" android:layout_width="52px" android:layout_height="52px" android:src="@drawable/ic_action_accept"/> <TextView android:id="@+id/lista_aluno_nome" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textsize="60px" android:textcolor="@color/black"/> </LinearLayout> XML de Layout Aparência

@Override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); Activity listadeparticipantes = (ListView) findviewbyid(r.id.listparticipantes); listadeparticipantes.setonitemclicklistener(this); FloatingActionButton fab = (FloatingActionButton) findviewbyid(r.id.fabaddparticipante); fab.attachtolistview(listadeparticipantes); actionbar = getsupportactionbar(); if(actionbar!=null){ actionbar.setbackgrounddrawable(new ColorDrawable(0xFFFF4500)); actionbar.settitle(r.string.lista_participantes); } }

@Override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); Activity listadeparticipantes = (ListView) findviewbyid(r.id.listparticipantes); listadeparticipantes.setonitemclicklistener(this); FloatingActionButton fab = (FloatingActionButton) findviewbyid(r.id.fabaddparticipante); fab.attachtolistview(listadeparticipantes); actionbar = getsupportactionbar(); if(actionbar!=null){ actionbar.setbackgrounddrawable(new ColorDrawable(0xFFFF4500)); actionbar.settitle(r.string.lista_participantes); } }

@Override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); Activity listadeparticipantes = (ListView) findviewbyid(r.id.listparticipantes); listadeparticipantes.setonitemclicklistener(this); FloatingActionButton fab = (FloatingActionButton) findviewbyid(r.id.fabaddparticipante); fab.attachtolistview(listadeparticipantes); actionbar = getsupportactionbar(); if(actionbar!=null){ actionbar.setbackgrounddrawable(new ColorDrawable(0xFFFF4500)); actionbar.settitle(r.string.lista_participantes); } }

@Override protected void oncreate(bundle savedinstancestate) { super.oncreate(savedinstancestate); setcontentview(r.layout.activity_main); Activity listadeparticipantes = (ListView) findviewbyid(r.id.listparticipantes); listadeparticipantes.setonitemclicklistener(this); FloatingActionButton fab = (FloatingActionButton) findviewbyid(r.id.fabaddparticipante); fab.attachtolistview(listadeparticipantes); actionbar = getsupportactionbar(); if(actionbar!=null){ actionbar.setbackgrounddrawable(new ColorDrawable(0xFFFF4500)); actionbar.settitle(r.string.lista_participantes); } }

Activity

Activity

Activity

Activity

Activity

Activity

Conceitos básicos Activity XML de Layout AndroidManifest Intent

public void abrirformparticipante(view view){ Intent irparaformulario = new Intent(this, FormularioParticipanteActivity.class); startactivity(irparaformulario); } Intent

Conceitos básicos Activity XML de Layout AndroidManifest Intent

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="br.com.kenuiapps.palestra" > <application android:allowbackup="true" android:icon="@drawable/java_ce" android:label="@string/app_name" android:theme="@style/apptheme" > <activity android:name=".activity.listaparticipantesactivity" android:theme="@style/theme.appcompat.light.darkactionbar"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:name=".activity.formularioparticipanteactivity" android:theme="@style/theme.appcompat.light.darkactionbar"/> </application> </manifest> AndroidManifest

<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="br.com.kenuiapps.palestra" > <application android:allowbackup="true" android:icon="@drawable/java_ce" android:label="@string/app_name" android:theme="@style/apptheme" > <activity android:name=".activity.listaparticipantesactivity" android:theme="@style/theme.appcompat.light.darkactionbar"> <intent-filter> <action android:name="android.intent.action.main" /> <category android:name="android.intent.category.launcher" /> </intent-filter> </activity> <activity android:name=".activity.formularioparticipanteactivity" android:theme="@style/theme.appcompat.light.darkactionbar"/> </application> </manifest> AndroidManifest

Mais conceitos... Adapter SQLite DAO Test

Mais conceitos... Adapter SQLite DAO Test

@Override protected void onresume() { super.onresume(); List<Participante> participantes = obtemlistadobanco(); ListaParticipantesAdapter adapter = new ListaParticipantesAdapter(this, participantes); listviewdeparticipantes.setadapter(adapter); } Adapter

public class ListaParticipantesAdapter extends BaseAdapter { private Activity activity; private List<Participante> participantes; public ListaParticipantesAdapter(Activity activity, List<Participante> participantes) { this.activity = activity; this.participantes = participantes; }... } Adapter

public class ListaParticipantesAdapter extends BaseAdapter { private Activity activity; private List<Participante> participantes; public ListaParticipantesAdapter(Activity activity, List<Participante> participantes) { this.activity = activity; this.participantes = participantes; }... } Adapter

@Override public View getview(int position, View convertview, ViewGroup parent) { View linha = activity.getlayoutinflater().inflate(r.layout.lista_participantes, null); Participante participante = participantes.get(position); TextView textviewnome = (TextView) linha.findviewbyid(r.id.lista_nome); textviewnome.settext(participante.getnome());... } Adapter

@Override public View getview(int position, View convertview, ViewGroup parent) { View linha = activity.getlayoutinflater().inflate(r.layout.lista_participantes, null); Participante participante = participantes.get(position); TextView textviewnome = (TextView) linha.findviewbyid(r.id.lista_nome); textviewnome.settext(participante.getnome());... } Adapter textviewnome

Mais conceitos... Adapter SQLite DAO Test

public class DataBaseHelper extends SQLiteOpenHelper { public static final String BANCO_DADOS = "Palestra"; private static int VERSAO = 1; public DataBaseHelper(Context context) { super(context, BANCO_DADOS, null, VERSAO); } SQLite

@Override public void oncreate(sqlitedatabase db) { db.execsql("create TABLE participante"+ " ( _id INTEGER PRIMARY KEY," + " nome TEXT," + " telefone TEXT," + " email TEXT," + " presente INTEGER, " + " tamanhoblusa INTEGER" + " );" ); } SQLite

@Override public void onupgrade(sqlitedatabase db, int oldversion, int newversion) { String dll = "DROP TABLE IF EXISTS participante"; db.execsql(dll); this.oncreate(db); } SQLite

Mais conceitos... Adapter SQLite DAO Test

public class ParticipanteDAO{ private DataBaseHelper helper; private SQLiteDatabase db; public PalestraDAO(Context context){ helper = new DataBaseHelper(context); } public SQLiteDatabase getdb() { if (db == null) { db = helper.getwritabledatabase(); } return db; } DAO

public class ParticipanteDAO{ private DataBaseHelper helper; private SQLiteDatabase db; public PalestraDAO(Context context){ helper = new DataBaseHelper(context); } public SQLiteDatabase getdb() { if (db == null) { db = helper.getwritabledatabase(); } return db; } DAO

public class ParticipanteDAO{... public long salva(participante participante) { ContentValues values = participante.getcontentvalues(); return getdb().insert(databasehelper.participante.tabela, null, values); }... DAO

public ContentValues getcontentvalues() { ContentValues values = new ContentValues(); values.put(databasehelper.participante.id, getid()); values.put(databasehelper.participante.nome, getnome());... return values; } DAO

Mais conceitos... Adapter SQLite DAO Test

public class ParticipanteDAOTest extends AndroidTestCase { public void testinsertdb() { ParticipanteDAO dao = new ParticipanteDAO(mContext); long qtddelinhasinseridas = dao.salva(dadoumparticipante()); asserttrue(qtddelinhasinseridas>0); } } Test

public class ParticipanteDAOTest extends AndroidTestCase { public void testinsertdb() { ParticipanteDAO dao = new ParticipanteDAO(mContext); long qtddelinhasinseridas = dao.salva(dadoumparticipante()); asserttrue(qtddelinhasinseridas>0); } } Test

Novidades Google I/O 2015

Internet das coisas

Tecido sensivel ao toque

Android Pay

Android Development Tools

Android Development Tools

Futuro???

Onde buscar o conhecimento? Getting Started Google+ & Udacity Alura Comunidades no Google+ Grupos Google Java CE Stack overflow

Referências http://www.androidcentral.com/android-50-lollipop-now-33-percent-devices http://www.android.com/play/ http://developer.android.com/about/dashboards/index.html http://www.google.com/design/spec/material-design/introduction.html https://developer.android.com/guide/index.html http://gizmodo.uol.com.br/google-brillo-weave/ http://gizmodo.uol.com.br/android-pay-oficial/ http://gizmodo.uol.com.br/android-m-oficial/ http://olhardigital.uol.com.br/noticia/google-lanca-tecnologia-de-tecido-sensivel-ao-toque/48855 http://info.abril.com.br/noticias/ti/2015/05/google-e-udacity-lancam-serie-completa-de-cursos-sobre-desenvolvimento-em-android.shtml https://dariomungoi.wordpress.com http://tudoandroid.net.br/googles-material-design-wins-award-best-contribution-ux/ http://robovm.com/google-io-summary-whats-new-in-android-development-tools/ http://www.androidcentral.com/ http://careers.stackoverflow.com/jobs/tag/android

Go Developers!!! daniel.baccin@gmail.com https://bitbucket.org/danielbaccin https://github.com/danielbaccin/palestra http://www.slideshare.net/baccin