Top 5 Features of Ice Cream Sandwich with Mono for Android 4.0
Upcoming SlideShare
Loading in...5
×
 

Top 5 Features of Ice Cream Sandwich with Mono for Android 4.0

on

  • 9,932 views

Video for these slides: http://www.youtube.com/watch?v=CcdUq1AQfQ8 ...

Video for these slides: http://www.youtube.com/watch?v=CcdUq1AQfQ8

Mike has been an active member of the community since MonoTouch launched, and recently joined Xamarin's excellent documentation team. In this seminar, Mike shows you how to use 5 of the new APIs available to developers with Mono for Android 4.0 and Ice Cream Sandwich;

Calendar API
ShareActionProvider
Action Bar Tabs
TextureView
Android Beam

Statistics

Views

Total Views
9,932
Views on SlideShare
3,184
Embed Views
6,748

Actions

Likes
1
Downloads
47
Comments
0

6 Embeds 6,748

http://blog.xamarin.com 6724
http://www.linkedin.com 20
http://translate.googleusercontent.com 1
http://webcache.googleusercontent.com 1
http://ej.sectorit.net 1
http://111.221.29.49 1

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Top 5 Features of Ice Cream Sandwich with Mono for Android 4.0 Top 5 Features of Ice Cream Sandwich with Mono for Android 4.0 Presentation Transcript

  • Xamarin Seminar 9th February 2012 Copyright 2012 © Xamarin Inc. All rights reserved
  • AgendaTop 5 Features of Ice Cream Sandwich Mike Bluestein Technical Writer Xamarin Documentation Team mike.bluestein@xamarin.com Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  • IntroductionThis session will survey some of the new featuresavailable in Android 4 Ice Cream Sandwich (ICS) Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  • IntroductionThis session will survey some of the new featuresavailable in Android 4 Ice Cream Sandwich (ICS) Calendar API Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  • IntroductionThis session will survey some of the new featuresavailable in Android 4 Ice Cream Sandwich (ICS) Calendar API ShareActionProvider Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  • IntroductionThis session will survey some of the new featuresavailable in Android 4 Ice Cream Sandwich (ICS) Calendar API ShareActionProvider Action Bar Tabs Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  • IntroductionThis session will survey some of the new featuresavailable in Android 4 Ice Cream Sandwich (ICS) Calendar API ShareActionProvider Action Bar Tabs TextureView Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  • IntroductionThis session will survey some of the new featuresavailable in Android 4 Ice Cream Sandwich (ICS) Calendar API ShareActionProvider Action Bar Tabs TextureView Android Beam Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  • Calendar API
  • Calendar API• Official Calendar API
  • Calendar API• Official Calendar API• Read-write access to calendar data
  • Calendar API• Official Calendar API• Read-write access to calendar data • android.permission.READ_CALENDAR
  • Calendar API• Official Calendar API• Read-write access to calendar data • android.permission.READ_CALENDAR • android.permission.WRITE_CALENDAR
  • Calendar Demo
  • Calendar Demo
  • Calendar Demo • Listing Calendars
  • Calendar Demo • Listing Calendars • Listing Calendar Events
  • Calendar Demo • Listing Calendars • Listing Calendar Events • Adding an Event
  • ShareActionProvider
  • ShareActionProvider• Enables sharing action from the Action Bar
  • ShareActionProvider• Enables sharing action from the Action Bar• Creates list of app that can handle the a sharing intent
  • ShareActionProvider• Enables sharing action from the Action Bar• Creates list of app that can handle the a sharing intent• Keeps a history of previously used apps for easy access later
  • ShareActionProvider• Enables sharing action from the Action Bar• Creates list of app that can handle the a sharing intent• Keeps a history of previously used apps for easy access later• Consistent user experience for sharing data throughout Android
  • ShareActionProvider Demo
  • ShareActionProvider Demo• Sharing an Image
  • ShareActionProvider Demo• Sharing an Image
  • ShareActionProvider Demo• Sharing an Image
  • Action Bar Tabs
  • Action Bar Tabs• TabActivity deprecated in ICS
  • Action Bar Tabs• TabActivity deprecated in ICS• Action Bar supports tabs in ICS
  • Action Bar Tabs• TabActivity deprecated in ICS• Action Bar supports tabs in ICS ActionBar.NavigationMode = ActionBarNavigationMode.Tabs;
  • Tabs Demo
  • TextureView
  • TextureView• Hardware accelerated 2D rendering
  • TextureView• Hardware accelerated 2D rendering• Display video or OpenGL content stream
  • TextureView• Hardware accelerated 2D rendering• Display video or OpenGL content stream• Supports view transformations
  • TextureView Example
  • TextureView Example public class TextureViewActivity : Activity, TextureView.ISurfaceTextureListener { Camera _camera; TextureView _textureView; protected override void OnCreate (Bundle bundle) { base.OnCreate (bundle); _textureView = new TextureView (this); _textureView.SurfaceTextureListener = this; SetContentView (_textureView); } public void OnSurfaceTextureAvailable (Android.Graphics.SurfaceTexture surface, int width, int height) { _camera = Camera.Open (); var previewSize = _camera.GetParameters ().PreviewSize; _textureView.LayoutParameters = new FrameLayout.LayoutParams (previewSize.Width, previewSize.Height, (int)GravityFlags.Center); try { _camera.SetPreviewTexture (surface); _camera.StartPreview (); } catch (Java.IO.IOException ex) { Console.WriteLine (ex.Message); } // this is the sort of thing TextureView enables _textureView.Rotation = 45.0f; _textureView.Alpha = 0.5f; } ... }
  • TextureView Example
  • Android Beam
  • Android Beam• Allows sharing data using Near Field Communication (NFC)
  • Android Beam• Allows sharing data using Near Field Communication (NFC)• Pushes messages when devices are close
  • Android Beam• Allows sharing data using Near Field Communication (NFC)• Pushes messages when devices are close• Activity on one device creates a message
  • Android Beam• Allows sharing data using Near Field Communication (NFC)• Pushes messages when devices are close• Activity on one device creates a message • Specifies Activity that can push it
  • Android Beam• Allows sharing data using Near Field Communication (NFC)• Pushes messages when devices are close• Activity on one device creates a message • Specifies Activity that can push it• Intent invoked on second device contains the message data
  • Android Beam Example
  • Android Beam ExampleCreate a message
  • Android Beam Example Create a messageprotected override void OnCreate (Bundle bundle){ ... _nfcAdapter = NfcAdapter.GetDefaultAdapter (this); _nfcAdapter.SetNdefPushMessageCallback (this, this);}public NdefMessage CreateNdefMessage (NfcEvent evt){ DateTime time = DateTime.Now; var text = ("Beam me up!nn" + "Beam Time: " + time.ToString ("HH:mm:ss")); NdefMessage msg = new NdefMessage ( new NdefRecord[]{ CreateMimeRecord ( "application/com.example.android.beam", Encoding.UTF8.GetBytes (text)) }); } }; return msg;}public NdefRecord CreateMimeRecord (String mimeType, byte [] payload){ byte [] mimeBytes = Encoding.UTF8.GetBytes (mimeType); NdefRecord mimeRecord = new NdefRecord ( NdefRecord.TnfMimeMedia, mimeBytes, new byte [0], payload); return mimeRecord;}
  • Android Beam Example Create a message Receive a messageprotected override void OnCreate (Bundle bundle){ ... _nfcAdapter = NfcAdapter.GetDefaultAdapter (this); _nfcAdapter.SetNdefPushMessageCallback (this, this);}public NdefMessage CreateNdefMessage (NfcEvent evt){ DateTime time = DateTime.Now; var text = ("Beam me up!nn" + "Beam Time: " + time.ToString ("HH:mm:ss")); NdefMessage msg = new NdefMessage ( new NdefRecord[]{ CreateMimeRecord ( "application/com.example.android.beam", Encoding.UTF8.GetBytes (text)) }); } }; return msg;}public NdefRecord CreateMimeRecord (String mimeType, byte [] payload){ byte [] mimeBytes = Encoding.UTF8.GetBytes (mimeType); NdefRecord mimeRecord = new NdefRecord ( NdefRecord.TnfMimeMedia, mimeBytes, new byte [0], payload); return mimeRecord;}
  • Android Beam Example Create a message Receive a messageprotected override void OnCreate (Bundle bundle) IParcelable [] rawMsgs = Intent.GetParcelableArrayExtra ({ NfcAdapter.ExtraNdefMessages); ... NdefMessage msg = (NdefMessage)rawMsgs [0]; _nfcAdapter = NfcAdapter.GetDefaultAdapter (this); _nfcAdapter.SetNdefPushMessageCallback (this, this);}public NdefMessage CreateNdefMessage (NfcEvent evt){ DateTime time = DateTime.Now; var text = ("Beam me up!nn" + "Beam Time: " + time.ToString ("HH:mm:ss")); NdefMessage msg = new NdefMessage ( new NdefRecord[]{ CreateMimeRecord ( "application/com.example.android.beam", Encoding.UTF8.GetBytes (text)) }); } }; return msg;}public NdefRecord CreateMimeRecord (String mimeType, byte [] payload){ byte [] mimeBytes = Encoding.UTF8.GetBytes (mimeType); NdefRecord mimeRecord = new NdefRecord ( NdefRecord.TnfMimeMedia, mimeBytes, new byte [0], payload); return mimeRecord;}
  • Android Beam Example
  • ReferencesIntroduction to Ice Cream Sandwichhttp://docs.xamarin.com/android/tutorials/Introduction_to_Ice_Cream_Sandwich Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  • Xamarin Seminar Please give us your feedback http://bit.ly/xamfeedback Follow us on Twitter @XamarinHQ 9th February 2012 Copyright 2012 © Xamarin Inc. All rights reserved