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

Like this? Share it with your network

Share

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

on

  • 10,030 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
10,030
Views on SlideShare
3,266
Embed Views
6,764

Actions

Likes
1
Downloads
47
Comments
0

6 Embeds 6,764

http://blog.xamarin.com 6740
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 Presentation Transcript

  • 1. Xamarin Seminar 9th February 2012 Copyright 2012 © Xamarin Inc. All rights reserved
  • 2. 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
  • 3. IntroductionThis session will survey some of the new featuresavailable in Android 4 Ice Cream Sandwich (ICS) Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  • 4. 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
  • 5. 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
  • 6. 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
  • 7. 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
  • 8. 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
  • 9. Calendar API
  • 10. Calendar API• Official Calendar API
  • 11. Calendar API• Official Calendar API• Read-write access to calendar data
  • 12. Calendar API• Official Calendar API• Read-write access to calendar data • android.permission.READ_CALENDAR
  • 13. Calendar API• Official Calendar API• Read-write access to calendar data • android.permission.READ_CALENDAR • android.permission.WRITE_CALENDAR
  • 14. Calendar Demo
  • 15. Calendar Demo
  • 16. Calendar Demo • Listing Calendars
  • 17. Calendar Demo • Listing Calendars • Listing Calendar Events
  • 18. Calendar Demo • Listing Calendars • Listing Calendar Events • Adding an Event
  • 19. ShareActionProvider
  • 20. ShareActionProvider• Enables sharing action from the Action Bar
  • 21. ShareActionProvider• Enables sharing action from the Action Bar• Creates list of app that can handle the a sharing intent
  • 22. 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
  • 23. 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
  • 24. ShareActionProvider Demo
  • 25. ShareActionProvider Demo• Sharing an Image
  • 26. ShareActionProvider Demo• Sharing an Image
  • 27. ShareActionProvider Demo• Sharing an Image
  • 28. Action Bar Tabs
  • 29. Action Bar Tabs• TabActivity deprecated in ICS
  • 30. Action Bar Tabs• TabActivity deprecated in ICS• Action Bar supports tabs in ICS
  • 31. Action Bar Tabs• TabActivity deprecated in ICS• Action Bar supports tabs in ICS ActionBar.NavigationMode = ActionBarNavigationMode.Tabs;
  • 32. Tabs Demo
  • 33. TextureView
  • 34. TextureView• Hardware accelerated 2D rendering
  • 35. TextureView• Hardware accelerated 2D rendering• Display video or OpenGL content stream
  • 36. TextureView• Hardware accelerated 2D rendering• Display video or OpenGL content stream• Supports view transformations
  • 37. TextureView Example
  • 38. 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; } ... }
  • 39. TextureView Example
  • 40. Android Beam
  • 41. Android Beam• Allows sharing data using Near Field Communication (NFC)
  • 42. Android Beam• Allows sharing data using Near Field Communication (NFC)• Pushes messages when devices are close
  • 43. Android Beam• Allows sharing data using Near Field Communication (NFC)• Pushes messages when devices are close• Activity on one device creates a message
  • 44. 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
  • 45. 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
  • 46. Android Beam Example
  • 47. Android Beam ExampleCreate a message
  • 48. 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;}
  • 49. 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;}
  • 50. 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;}
  • 51. Android Beam Example
  • 52. ReferencesIntroduction to Ice Cream Sandwichhttp://docs.xamarin.com/android/tutorials/Introduction_to_Ice_Cream_Sandwich Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  • 53. 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