Tải bản đầy đủ - 0 (trang)
Appendix A. Creating Android Virtual Devices

Appendix A. Creating Android Virtual Devices

Tải bản đầy đủ - 0trang

Figure A-1. Android SDK Manager

As described in Chapter 6, even though Google Maps is available for you to use on

most Android devices, it is technically not part of the stock Android installation. In

order to use these APIs in an emulator image, you will need to create that image using

the Google API package for the Android version you want. You can refer back to

Chapter 6 for more details on the reasons behind this requirement.

To demonstrate creating a new virtual device, we will set up a Gingerbread device using

API level, which includes the Google APIs. As such, make sure you have installed that

SDK package on your computer (see Figure A-1). Next, open AVD (Android Virtual

Device) Manager, which is located in the same folder as SDK Manager. This tool allows

you to configure different virtual devices using any configuration you want.

When you launch AVD Manager, you will first see a list of existing virtual devices that

are available to you. From here, you can start any of these devices, modify them, or

create new ones. On the right side of the AVD Manager window, click on New to start

creating a new device. Configure the device to have the following:

Name: GingerbreadMaps

Target: Google APIs (Google Inc.) – API Level 10

SD Card Size: 512 MB

Skin: Built-in QVGA

Once you set it up, your window should look similar to Figure A-2. The reason for

choosing QVGA here for the screen resolution is to try to improve performance by

150 | Appendix A: Creating Android Virtual Devices


Figure A-2. Creating a new virtual device

keeping the screen resolution down. A smaller screen size means that the emulator

needs to do less work to draw the screen, which can go a long way in making the

emulator much more usable. Click on the Create AVD button to save the device and

make it available for testing your applications.

Even though you can start a virtual device from inside AVD Manager,

it is generally not recommended when developing with Mono for Android. By default, Android will start up the emulator with a partition

size that is often too small for the Mono for Android development platform, so you may run into issues with running out of space. Instead,

you should start the emulator from inside of Visual Studio or

MonoDevelop, as described in Chapter 2, which will result in the emulator starting up with a larger partition size and avoid these problems.

Creating Android Virtual Devices | 151




Further Reading

This book aims to get your feet wet with iOS, Android, and Windows Phone, but there

is plenty more to explore for all of them. This section will provide some starting points

for digging deeper into each of the platforms on its own. One thing to keep in mind for

MonoTouch and Mono for Android is that resources written with the native languages

in mind, Objective-C and Java, are still very useful even though you’re working in C#

since the Mono products provide bindings to the native APIs. You’re still writing native

applications so many of the same concepts and classes apply, regardless of the language.



Professional iPhone Programming with MonoTouch and .NET/C#

Wallace B. McClure, Rory Blyth, Craig Dunn, Chris Hardy, Martin Bowling

Wrox, 2010



Learning MonoTouch: A Hands-On Guide to Building iOS Applications with

C# and .NET

Michael Bluestein

Addison-Wesley Professional, 2011


Developing C# Apps for iPhone and iPad using MonoTouch: iOS Apps

Development for .NET Developers

Bryan Costanich



Apress, 2011



Xamarin: MonoTouch Documentation


Xamarin: Sample Applications and Code


Apple: iOS Dev Center




Professional Android Programming with Mono for Android and .NET/C#

Wallace B. McClure, Nathan Blevins, John J. Croft, IV, Jonathan Dick, Chris Hardy

Wrox, 2012



Programming Android

Zigurd Mednieks, Laird Dornin, G. Blake Meike, Masumi Nakamura

O’Reilly Media, 2011



Xamarin: Mono for Android Documentation


Xamarin: Sample Applications and Code


Google: Android Documentation


154 | Appendix B: Further Reading


Windows Phone


Programming Windows Phone 7

Microsoft, 2010

Charles Petzold



Migrating to Windows Phone

Jesse Liberty, Jeff Blankenburg

Apress, 2011


101 Windows Phone 7 Apps

Sams, 2011

Adam Nathan



31 Days of Mango


Jeff Blankenburg’s Blog


Jesse Liberty’s Blog


Windows Phone Developer Training Kit


Windows Phone | 155



About the Author

Greg Shackles is a senior software engineer at OLO Online Ordering, based in New

York City. An active member of the community, Greg speaks regularly at many user

groups and regional events. Greg received both bachelor’s and master’s degrees in

computer science from Stony Brook University. In addition to his passion for

technology, he is also an avid fan of heavy metal, baseball, and craft beer, sometimes

in combination. His blog, which focuses mainly on .NET and related topics, can be

found at http://www.gregshackles.com.



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Appendix A. Creating Android Virtual Devices

Tải bản đầy đủ ngay(0 tr)