Introduction to android development using net and monodroid
Download
1 / 28

- PowerPoint PPT Presentation


  • 419 Views
  • Uploaded on

Introduction to Android Development Using .NET and MonoDroid. Greg Shackles Senior Application Developer MagazineRadar [email protected] We thank the following companies for their gracious sponsorship. Platinum Sponsor. Gold Sponsors. Silver Sponsors. About Me. Greg Shackles

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about '' - tass


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
Introduction to android development using net and monodroid

Introduction to Android Development Using .NET and MonoDroid

Greg Shackles

Senior Application Developer

MagazineRadar

[email protected]


We thank the following companies for their gracious sponsorship

Platinum Sponsor

Gold Sponsors

Silver Sponsors


About me

About Me sponsorship

  • Greg Shackles

  • [email protected]

  • gregshackles.com

  • Twitter: @gshackles

  • github.com/gshackles


What we ll cover

What We’ll Cover sponsorship

  • What is Android?

  • Android architecture

  • Application lifecycle

  • Mono / MonoDroid

  • MonoDroid API

  • Demos


What is android

What is Android? sponsorship

  • Full stack

  • Open source

  • SDK provides tools and Java API

  • Applications typically written in Java

  • Purchased by Google in 2005

  • v1.0 released in October 2008

  • developer.android.com


Market share us

Market Share (US) sponsorship

28.7%

13%


Architecture

Architecture sponsorship


Architecture1

Architecture sponsorship


Architecture2

Architecture sponsorship


Architecture3

Architecture sponsorship


Architecture4

Architecture sponsorship


Component types

Component Types sponsorship


Activities

Activities sponsorship

  • Provides UI for one screen

  • Can start other activities

  • Hierarchy of views

  • Typically defined in XML


Activity lifecycle

Activity Lifecycle sponsorship

Activity Starts

onRestart()

onStart()

onResume()

onCreate()

User navigates back

to the activity

Activity is running

User navigates back

to the activity

User navigates back

to the activity

Another activity is loaded

Process killed

Other apps need memory

onPause()

This activity is no longer visible

onStop()

Activity is shut down

onDestroy()


Activity lifecycle simplified

Activity Lifecycle (Simplified) sponsorship

  • Activity stack

  • Configuration changes cause activity restart

  • Activity has 3 basic states

    • Running

    • Paused

    • Stopped


Broadcast receivers

Broadcast Receivers sponsorship

  • No UI

  • Can start an activity

  • Receive/react to announcements

  • Apps can broadcast custom messages

  • Examples: low battery, phone call


Services

Services sponsorship

  • No UI, runs in background

  • Stays running when application loses focus

  • Can be accessed by many applications

  • Example: Music player


Content providers

Content Providers sponsorship

  • Enables applications to share data


Intents

Intents sponsorship

  • Messages used to activate components

    • Launch an activity

    • Start or bind to a service

    • Broadcast a message to receivers

    • Implicit intents

  • Intent filters

    • Components register their capabilities

    • Example: launcher


Storage

Storage sponsorship

  • Shared preferences

  • Internal storage

  • External storage (SD card)

  • Database (SQLite)

  • Remote


Want to write Android applications in .NET? sponsorship

With MonoDroid, you can!


What is mono

What is Mono? sponsorship

  • Implementation of the .NET CLR

  • Open source

  • Cross platform

  • Supports most of .NET 4.0

    • Missing WPF, Entity Framework, WF, some WCF


What is monodroid

What is sponsorshipMonoDroid?

  • Runs side by side with Dalvik

  • Wraps Java/Android API bindings

  • Commercial product

  • Currently in public beta

  • Visual Studio 2010 or MonoDevelop

  • www.monodroid.net


Monodroid architecture

MonoDroid sponsorshipArchitecture

  • Android/Managed Callable Wrappers

    • JNI bridges to talk between Android and Mono

  • Optional shared runtime


Monodroid api

MonoDroid sponsorship API

  • .NET events replace listener interfaces

  • Action replaces Runnable

  • Enumerations

  • Properties

  • Attributes and tooling generate configuration

  • OpenTK

  • Uses standard Android resource files


Java vs c

Java sponsorshipvs C#

Java


Java vs c1

Java sponsorshipvs C#

Java

C#


Questions

Questions? sponsorship


ad