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

Xamarin Mobile Application Development for Android - Second Edition

Nilanchala Panigrahy

Buch teilen
  1. 296 Seiten
  2. English
  3. ePUB (handyfreundlich)
  4. Über iOS und Android verfügbar
eBook - ePub

Xamarin Mobile Application Development for Android - Second Edition

Nilanchala Panigrahy

Angaben zum Buch
Buchvorschau
Inhaltsverzeichnis
Quellenangaben

Über dieses Buch

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.

Häufig gestellte Fragen

Wie kann ich mein Abo kündigen?
Gehe einfach zum Kontobereich in den Einstellungen und klicke auf „Abo kündigen“ – ganz einfach. Nachdem du gekündigt hast, bleibt deine Mitgliedschaft für den verbleibenden Abozeitraum, den du bereits bezahlt hast, aktiv. Mehr Informationen hier.
(Wie) Kann ich Bücher herunterladen?
Derzeit stehen all unsere auf Mobilgeräte reagierenden ePub-Bücher zum Download über die App zur Verfügung. Die meisten unserer PDFs stehen ebenfalls zum Download bereit; wir arbeiten daran, auch die übrigen PDFs zum Download anzubieten, bei denen dies aktuell noch nicht möglich ist. Weitere Informationen hier.
Welcher Unterschied besteht bei den Preisen zwischen den Aboplänen?
Mit beiden Aboplänen erhältst du vollen Zugang zur Bibliothek und allen Funktionen von Perlego. Die einzigen Unterschiede bestehen im Preis und dem Abozeitraum: Mit dem Jahresabo sparst du auf 12 Monate gerechnet im Vergleich zum Monatsabo rund 30 %.
Was ist Perlego?
Wir sind ein Online-Abodienst für Lehrbücher, bei dem du für weniger als den Preis eines einzelnen Buches pro Monat Zugang zu einer ganzen Online-Bibliothek erhältst. Mit über 1 Million Büchern zu über 1.000 verschiedenen Themen haben wir bestimmt alles, was du brauchst! Weitere Informationen hier.
Unterstützt Perlego Text-zu-Sprache?
Achte auf das Symbol zum Vorlesen in deinem nächsten Buch, um zu sehen, ob du es dir auch anhören kannst. Bei diesem Tool wird dir Text laut vorgelesen, wobei der Text beim Vorlesen auch grafisch hervorgehoben wird. Du kannst das Vorlesen jederzeit anhalten, beschleunigen und verlangsamen. Weitere Informationen hier.
Ist Xamarin Mobile Application Development for Android - Second Edition als Online-PDF/ePub verfügbar?
Ja, du hast Zugang zu Xamarin Mobile Application Development for Android - Second Edition von Nilanchala Panigrahy im PDF- und/oder ePub-Format sowie zu anderen beliebten Büchern aus Ciencia de la computación & Desarrollo de aplicaciones. Aus unserem Katalog stehen dir über 1 Million Bücher zur Verfügung.

Information

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...

Inhaltsverzeichnis