Xamarin Mobile Application Development for Android - Second Edition
eBook - ePub

Xamarin Mobile Application Development for Android - Second Edition

Nilanchala Panigrahy

Compartir libro
  1. 296 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Xamarin Mobile Application Development for Android - Second Edition

Nilanchala Panigrahy

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

Develop, test, and deliver fully-featured Android applications using XamarinAbout This Book• Build and test multi-view Android applications using Xamarin.Android• Work with device capabilities such as location sensors and the camera• A progressive, hands-on guide to develop stunning Android applications using XamarinWho This Book Is ForIf you are a C# developer who wants to develop Android apps and enhance your existing skill set, then this book is ideal for you. Good working knowledge of C#, .NET, and object-oriented software development is assumed.What You Will Learn• Build a multi-view, orientation-aware Android application with navigation• Lay out content using the LinearLayout, RelativeLayout, and TableLayout layout managers• Use a ListView (AdapterView) and Adapter to build a view that is populated from server data• Consume REST web service to perform GET, UPDATE, DELETE operation• Use Android SQLite for data persistence and caching• Capture the current location of a device, determine the street address, and integrate with the map app• Test, debug, and deploy an Android appIn DetailTechnology trends come and go, but few have generated the excitement, momentum, or long-term impact that mobile computing has. Mobile computing impacts people's lives at work and at home on a daily basis. Many companies and individual developers are looking to become a part of the movement but are unsure how to best utilize their existing skills and assets. The Xamarin suite of products provides new opportunities to those who already have a significant investment in C# development skills and.NET code bases, and would like to enter into this new, exciting world.This example-oriented guide provides a practical approach to quickly learn the fundamentals of Android app development using C# and Xamarin.Android. It will lead you through building an Android app step-by-step with steadily increasing complexity.Beginning with an overview of the Android and Xamarin platforms to provide you with a solid understanding of the underlying platform, we gradually walk through building and testing a Points of Interest Android app using C# and the Xamarin.Android product. You will learn to create ListView and add detail view to your Android application. You will handle application behaviors on orientation changes, before learning the different techniques to manage resources and layouts to support multiple screen sizes. You will then access a SQLite database in a cross-platform way and add location features to your application. Finally, you will add camera integration to your application and deploy your app to the various Android app stores.Style and approachAn example-oriented, comprehensive guide to gain an understanding of both the Android and Xamarin platforms.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Xamarin Mobile Application Development for Android - Second Edition un PDF/ePUB en línea?
Sí, puedes acceder a Xamarin Mobile Application Development for Android - Second Edition de Nilanchala Panigrahy en formato PDF o ePUB, así como a otros libros populares de Ciencia de la computación y Desarrollo de aplicaciones. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2015
ISBN
9781785280634

Xamarin Mobile Application Development for Android Second Edition


Table of Contents

Xamarin Mobile Application Development for Android Second Edition
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Downloading the color images of this book
Errata
Piracy
Questions
1. The Anatomy of an Android App
The Android platform
Versions of Android
The Linux kernel
Native libraries
The Android runtime
The application framework
The application layer
The building blocks of the Android application
The Android packages (.apk)
The application manifest
Activities
The life cycle of an activity
The events of an activity
Fragments
The fragment life cycle
Services
Content providers
Broadcast receivers
Views and ViewGroups
Declarative versus programmatic View creation
User interface widgets
Common layouts
Adapter layouts
XML layout files
Element and attribute names
The View and layout identifiers
Using XML layouts from activities
Intents
Resources
The R.java file
Summary
2. The Xamarin.Android Architecture
Getting started with Xamarin
Why Xamarin.Android?
The benefits of using Xamarin.Android
The drawbacks of using Xamarin.Android
What is Mono?
Mono and Dalvik side by side
The Java Native Interface
Peer objects
Xamarin.Android application packaging
The Android bindings design
Design principles
C# properties
Delegates
Constants to enumerations
Development environments
Xamarin Studio
Xamarin for Visual Studio
IDE comparison
Compatibility
Summary
3. Creating the Points Of Interest App
The sample POIApp
Installing Xamarin.Android
Installing platforms and tools
Tools
The Android platform APIs
The Android platform Extras
Creating Android Virtual Devices
Cloning a virtual device
Speeding up the Android emulator
Using the x86 emulator
Third-party emulator solutions
The Xamarin Android Player
Genymotion
Creating the POI app
The Xamarin Studio IDE
The Project Options view
Understanding the project structure
The Xamarin Studio layout designer
The designer content layout
The Document Outline and Properties pads
Toolbox
Setting the target framework
Setting the app icon and package name
The launcher activity
Running and debugging the app
Debugging with an Android device
Enabling USB debugging
Installing a USB driver
Running apps on a device
Behind the scenes
The peer object
The AndroidManifest.xml file
Summary
4. Adding a List View
Creating the POI ListView layout
Creating POIListActivity
Creating the POI list row layout
Adding a RelativeLayout view group
Adding an ImageView widget
Adding a LinearLayout widget
Adding the name and address TextView classes
Adding the distance TextView
Creating the PointOfInterest apps entity class
Populating the ListView item
Creating POIListViewAdapter
Implementing a constructor
Implementing Count { get }
Implementing GetItemId()
Implementing the index getter method
Implementing GetView()
Reusing row Views
Populating row Views
Populating the list thumbnail image
Using UrlImageViewHelper
Adding Internet permissions
Hooking up POIListViewAdapter
Consuming the web service
An introduction to web services
Deploying the POI web service
Consuming REST web services asynchronously
Creating the POIService class
Asynchronous programming with async and await
Serializing and deserializing using Json.NET
Updating POIListActivity
Adding actions to ActionBar
Defining the menu XML file
Setting menus in OnCreateOptionsMenu()
Handling selection in OnOptionsItemSelected()
Handling the ListView click event
Handling no network condition
Toast
Summary
5. Adding a Details View
Creating the POIDetail layout
Understanding ScrollView
Using the TableLayout manager
Working with EditText's InputType
Creating POIDetailActivity
Adding navigation to POIDetailActivity
Navigation on the POIList item click
Receiving the data in POIDetailActivity
Binding variables to controls
Populating user interface widgets
Adding the save and delete actions
Disabling the delete action
Adding the save and delete actions in POIService
Consuming the web service to create or update a POI
Adding the CreateOrUpdatePOIAsync method to POIService
Consuming the web service to delete the POI
Adding the DeletePOIAsync method to POIService
Creating SavePOI()
Creating DeletePOI()
Adding validation
Using the EditText.Error property
Adding a delete confirmation prompt
Refreshing POIListActivity
Summary
6. Making Your App Orientation-aware
The Android behavior on configuration changes
Locking the Android application orientation
Dynamically requesting the orientation
Saving the activity state for configuration changes
Manually saving the activity state
Retaining the POI list scroll position
Building the orientation-aware layout
Manually handling the orientation behavior
Summary
7. Designing for Multiple Screen Sizes
An introduction to Android tablets
Creating an Android tablet emulator
An introduction to fragments
Creating a new fragment
Making POIApp compatible with Android tablets
Using fragments for displaying POIDetails
Creating the POIDetailsFragment layout
Creating the POIDetailFragment
Working with the save and delete actions
Adding the POIDetailFragment to POIDetailActivity
Modifying the POI details activity layout
Refactorin...

Índice