260 likes | 422 Views
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.
E N D
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
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
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
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.
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)
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
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
Eclipse User Interface Key features Autocomplete Refactor Auto-format Debug UI Default Layout
Configure an android project Configure library Change android version Compile and export APK
Debug User Interface Watch Variable Set breakpoint
LogCat Red event means serious error or exception
Create a Android Virtual Device Most important Screen size and resolution Android version
Alternative Android Emulator • GenyMotion • Available for windows, mac & linux • Use Virtual Box • Fast as it uses hardware acceleration • GPS emulator • Eclipse plugin is available
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
Development software and languages (Windows Phone Apps) Development Languages: C#, VB Visual UI design Publish package: XAP file
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”
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
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.