Android Development for . NET / C # Developers with MonoDroid ...

fansbutterflyΚινητά – Ασύρματες Τεχνολογίες

19 Ιουλ 2012 (πριν από 5 χρόνια και 28 μέρες)

939 εμφανίσεις

Android Development for .NET/C#
Developers with MonoDroid
Wallace B. (Wally) McClure (aka “.NET Judas”)
Scalable Development, Inc.
http://www.morewally.com/
http://www.scalabledevelopment.com/
Twitter: @
wbm
Who am I?

“Professional Android Programming with
MonoDroid and .NET/C#”

Summer 2011.

Visual Studio Magazine Article.

“iPhone
Apps for the .NET Developer”

Ebook
.

Print
book.

“Beginning AJAX with ASP.NET”

“Beginning ASP.NET 2.0 AJAX


MVP

ASP.NET.

ASPInsider
.

ASP.NET Podcast
.
My mobile history

Mobile is a twinkle in my eye.

“Mobile doesn’t sell.”

Early 2009.

Cloud application.

Convinced that needed to be on the iPhone.

How?

Looked at alternatives.

MonoTouch.

Apple iPhone SDK missteps.

Hey there’s the Android thing taking off.

Wow, there’s huge growth in Android.
Android History

2005

Google purchases Android, Inc.

2007

OHA announced.

Fall 2008

1.0 SDK ships.

2009

Various updated SDKs.

Summer 2009

MonoTouch.

2010

Momentum grows significantly.

Winter 2010

MonoDroid
.

August 2010

Preview 1.
Where are we at?

Increasingly mobile.

Laptops are not quite convenient.

Power management is important.

Wifi
is not everywhere
.

Multiple smartphone platforms.

iPhone
has tremendous mindshare/
marketshare
.

Android has seen tremendous growth.

RIM is dominant in the corporate market.

Windows Phone 7 has shipped.

.NET Framework is
a popular framework
.
Mobile Development Issues

Battery.

Screen Size.

CPU.

Memory.

Development Tools.

Using Existing Knowledge.
Why Android
What is
MonoDroid
?

Mono

Open Source implementation of .NET.

MonoDroid is
a .NET/c# layer over
native APIs.

Visual Studio

IDE.

No
Design Surface.
Runtime Concept
Why MonoDroid?
Devices/Technology

Android.

Growth rates

.NET

Market Share
.

Existing Knowledge.

Mono

Cross Platform.

Maturity
.
Developer

Visual Studio Ecosystem.

Source Control.

Plugins.

Languages.

C#.

Others in the future.

Your existing knowledge!

Some level of
compat
with MonoTouch.
Current Status

Mono/
MonoDevelop
are released
products.

MonoDroid is currently in a public beta.

Code on my system:

Android 2.3 SDK.

Visual Studio 2010.

MonoDroid plugin.

Java.

Eclipse 3.6.

DroidDraw.
Mileage May Vary

Have a Heart
What
MonoDroid
is Not

Not
Winforms
/WPF on
Android.

Not
a cross
-
platform/cross
-
compiler tool.

“.NET is (Southern)American English.
MonoDroid
is
British English. C# is the common bond to learn the
customs (programming
idiosyncracies
) of
Android.”
How do the users get the Framework?

Embedded with your app.

Standalone.
What about Silverlight?
Editions

Trial
-
“Community”

Free.

Simulator

Can’t deploy to device.

Student.

Single
User.

Enterprise
.
Let’s get started installing
Windows

VS2010 (not Express).

Java 6 SDK.

Android 2.3 SDK.

MonoDroid.

http://monodroid.net/Installation
Mac OSX

OSX 10.6.

Java SDK.

Android 2.3 SDK.

MonoDevelop
2.4.2.

MonoDroid for Mac.

Configure MonoDroid.

http://monodroid.net/Installation_for_Mac
Projects Folders

“01

MonoDroid Intro App”
Let’s Get Started with
MonoDroid!
Terms

Activity.

Resources.

Intent.

PendingIntent
.

BroadcastReceiver
.
Create a
N
ew Project
Project
Resources

UI.

Images.

Defined strings.

Icons.

Resource.Designer.cs
Code

Activity.

Application.

Attributes.

Load UI.

Setup Controls.

Events.
Design Surface

Visual Studio features a really great design surface.

ASP.NET.

Winforms
.

No design surface for
MonoDroid
.

Intellisense.

XML based layout language.

DroidDraw.

Eclipse Plugin.
If you want to see MonoDroid for the
Mac?
Hey, Your Apps are Big!

Linker

Only what you need.

Two ways to ship.

Runtime Embedded

default.

Stand alone.
Debugging

ADB.

DDMS.

Visual Studio Debugging.

BreakPoints
.

Emulator
Settings
-
http://
bit.ly/ghU7E0

no
-
boot
-
anim.

Snapshots.
Resources

http://
MonoDroid.Net/
.

https://github.com/mono/monodroid
-
samples
/

Reto
Meier

Pro Android 2 by
Wrox
.

http://morewally.com/
.

http://redth.info/
.

Good
examples online.

Twitter
hashtag
: #
monodroid

IRC channel
.
Cross Platform
-
MDr
, MT, WP7

MonoDroid
-
Growth Rates.

MonoTouch
-
$ volume.

Windows Phone 7
-
.NET/Silverlight.

Problem.

Various UIs.

Integrate .NET logic.
Strategy

Separate UI / Logic projects.

Logic
-
.NET only.

Graphic UI libraries

OpenGL.

Delta Engine.
What we’ve done

Short Introduction to Android.

Walked through the MonoDroid plugin.

Deployed an App.

Debugged.

Caveats.
Thanks!

You.

The entire Mono Team.

Miguel D.
Icaza
.

Joseph Hill.

Jon Pryor.

Jonathan Pobst
.

Robert “Bob” Elliott.

Jim
Minatel
.

Wiley Publishing.

A great set of co
-
authors.

A great set of tech editors.