OzAltNet Fast-ANDroid-furious

download OzAltNet Fast-ANDroid-furious

If you can't read please download the document

Transcript of OzAltNet Fast-ANDroid-furious

Fast ANDroid Furious

Android with C# in 20 minutes

What is Mono?

Open source implementation of the CLRLinux, MacOS X, Solaris, BSD, Wii, PS3

Started in 2001 as Ximian, purchased by Novell
in 2003, released in 2004

2009: MonoTouch created (released 2010)

2010: MonoDroid created (released 2011)

2011: Novell purchased by Attachmate ($2.2b)entire Mono team sacked > startup Xamarin created...

http://www.mono-project.com/

http://github.com/mono

What is was Mono for Android?

Mono ('Silverlight subset')+ Android API bindings + 'AXML' intelli-sense support + Visual Studio plug-in (or MonoDevelop)= Android application

http://mono-android.net/

Released April 2011Retired May 2011??

Mono for Android System Req's

To play in the simulator (FREE) Mac OSX with MonoDevelop
OR Windows (VisualStudio 2010 or MonoDevelop)

Oracle's Java SDK

Google's Android SDK

Mono for Android Trial (and MonoDevelop IDE)

To get onto a deviceMono for Android Prof or Enterprise license (USD399+)

To get onto Android MarketGoogle Developer account (USD25)

//TODO:

ActivityOnCreateSetContentView and FindViewById

/layout/ , /res/ and Resources

AndroidManifest.xml

ApplicationOnCreate

IntentPutExtra() and GetStringExtra

These examples are useful

http://www.otierney.net/objective-c.html

http://en.wikipedia.org/wiki/Objective-C

Activity LifecycleActive/running

Paused

Stopped

Killed/shutdown

You should always call up to your superclass when implementing these methods

Details!

Debugging

Linking

UIiOS

Android

Navigation

Databinding

F.A.Q.

Debugging

'soft debugger' gets embedded in your appCan be configured (IP address, port)

Binaries are much larger (of course)

Allows breakpoints, step-through, call stack

Works via TCP/IP, so you can debug the Simulator AND the device (untethered, so long as wifi is enabled).

Linking

Mono compiler strips out unused classes/librariesMobile devices size matters!

Trap for young players: it might strip out stuff you want to keep!Classes/methods/properties used via Reflection

Classes/methods/properties used in serialization operations

By default it's disabled in DEBUG, so stuff will work there and mysteriously break in RELEASE

[Preserve(AllMembers = true)]

Navigation

Getting from screen to screen

StartActivity()

IntentSetClass
typeof(AnActivity)

PutExtraCan also 'trigger' other applications

PushViewController()

UIViewControllerSubclass and pass instance

also UITabBar items

Databinding (lists)

More work that you are used to...

BaseAdapterGetView

Count

GetItem(.ItemClick is attached to the ListView itself)

UITableViewSourceGetCell

RowsInSection

RowSelected

'translation'

Example: RestGuide

Runs on Android, iOS and Windows Phone 7

github.com/conceptdev

Example: MIX11

Runs on Android, iOS and Windows Phone 7

mix11.confapp.com

Any questions?

Professional iPhone w/ MonoTouch

http://conceptdev.blogspot.com

@conceptdev