mobile device development

26
UFCFX5-15-3 Mobile Device Development Mobile Device Development Android Development Environments and Windows

Upload: vera-turner

Post on 03-Jan-2016

41 views

Category:

Documents


2 download

DESCRIPTION

Mobile Device Development. Android Development Environments and Windows. Agenda. Software and hardware Connect the android device to a PC Install and configure the Android SDK Eclipse User Interface Create and Configure the Android Emulator Windows App Development Environment. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Mobile Device Development

Android Development Environments and Windows

Page 2: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Agenda

Software and hardware Connect the android device to a PC Install and configure the Android SDK Eclipse User Interface Create and Configure the Android Emulator Windows App Development Environment

Page 3: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Software and Hardware

• Hardware

• Windows PC (Windows XP, Vista and 7).

• An Android phone or tablet with a mini USB cable

• Software

• Java SE Development Kit (JDK)

• Eclipse

• ADT plugin for Eclipse

• Android SDK (Download from develper.android.com)

• USB driver for the android device

Page 4: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Connect the Android Device to a PC

Use software packages from device manufacturer

For example, Samsung Kies and HTC Sync Manager

Download from manufacturer support website.

Use the USB driver

Download from device manufacturer or third-party website

Use the generic USB driver from Google

Page 5: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Android Device Drivers in PC Device Manager

Page 6: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Configure your Android device for development

Page 7: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Enable developer option in Nexus 7

Page 8: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Adb driver not recognized??

Page 9: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Install and configure the Android SDK

Download android SDK ADT Bundle for Windows from developer.android.com.

Bundle includes Eclipse, ADT plugin for android, Android SDK.

Run SDK Manager.exe as administrator

Download all SDKs for all android level/version. Download extra library and tools.

Page 10: Mobile Device Development

UFCFX5-15-3Mobile Device Development

SDK Manager

Page 11: Mobile Device Development

UFCFX5-15-3Mobile Device Development

SDK Tools

Android Debug Bridge (adb). A client-server program Often use it to install app into device or emulator Can be found in <sdK>/platform-tools

Device Monitor. Often use it to capture screenshot Can be found in <sdK>/tools/monitor.bat

Logcat (The android logging system)

Page 12: Mobile Device Development

UFCFX5-15-3Mobile Device Development

ADB usages

Install apps to android devices from PC adb –d install xxx.apk

Install apps to android emulator. adb install xxx.apk

Kill and restart adb thread adb kill-server adb start-server

Copy files from PC to android devices adb push foo.txt /sdcard/

-d for direct an adb command to the only attached USB device

Page 13: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Unlock the device (advanced features)

Unlock your devices for installing customized android ROM To unlock

adb reboot bootloader fastboot devices fastboot oem unlock

Install recovery image fastboot flash recovery your_recovery_image.img

Install customized ROM adb push customizeRom.zip /sdcard/ Install zip from recovery menu

Page 14: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Eclipse User Interface

Default

Layout

Key features

Autocomplete

Refactor

Auto-format

Debug UI

Page 15: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Import an android project

Page 16: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Configure an android project

Configure library

Change android version

Compile and export APK

Page 17: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Debug User Interface

Watch

Variable

Set breakpoint

Page 18: Mobile Device Development

UFCFX5-15-3Mobile Device Development

LogCat

Red event means serious error or exception

Page 19: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Create new activity

Page 20: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Create a Android Virtual Device

Most important

Screen size and resolution

Android version

Page 21: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Alternative Android Emulator

GenyMotion

1.Available for windows, mac & linux

2.Use Virtual Box

3.Fast as it uses hardware acceleration

4.GPS emulator

5.Eclipse plugin is available

Page 22: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Windows Apps for Phone and Tablet App development for Windows Phone 7

Windows PC (Vista, 7 or 8) Visual Studio 2010 or higher Windows Phone SDK 7.x or 8.x

App development for Windows Phone 8 Windows 8 PC Visual Studio Express 2012 for Windows Phone (FREE) Windows Phone SDK 8.x

App development for Windows Store Apps Windows 8 PC Visual Studio Express 2012 for Windows 8 (FREE) SDK for Windows 8

Page 23: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Development software and languages (Windows Phone Apps)

Development

Languages:

C#, VB

Visual UI design

Publish package:

XAP file

Page 24: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Test phone app in the real device Open a developer account ($19 USD per year) Register phone in the development account

Connect phone with Windows PC using a USB cable Run PhoneReg.exe (under directory of Windows

Phone/v8.0/Tools) Make sure to unlock the phone screen Make sure that date and time are correct

Deploy app via “Build menu” and “Deploy Solution”

Page 25: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Test Windows 8 app in the real device

Develop the app in a touch screen Windows 8 laptop Open a developer account ($19 USD per year) Deploy app via menu “Start Debugging” in local

machine

Page 26: Mobile Device Development

UFCFX5-15-3Mobile Device Development

Summary

• Eclipse is the integrated development environment for Android app development. It allows apps directly deploying onto the android device via the ADT plugin. It also allows developer debugging the android codes in the real device.

• Using Android emulator/android virtual device is another way to test the android app.

• Official android SDK has a lot of resources and tools to help develop, test and publish the android app.

• Visual Studio is the integrated development environment for both Windows Phone app and Windows Store app development. C# can be used for both phone and Windows tablet app development.