SlideShare a Scribd company logo
1 of 53
Xamarin
   Seminar
    9th February 2012
    Copyright 2012 © Xamarin Inc. All rights reserved
Agenda
Top 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
Introduction
This session will survey some of the new features
available in Android 4 Ice Cream Sandwich (ICS)




                                                                     Xamarin
                 Copyright 2012 © Xamarin Inc. All rights reserved
Introduction
This session will survey some of the new features
available in Android 4 Ice Cream Sandwich (ICS)


                        Calendar API




                                                                     Xamarin
                 Copyright 2012 © Xamarin Inc. All rights reserved
Introduction
This session will survey some of the new features
available in Android 4 Ice Cream Sandwich (ICS)


                   Calendar API
                ShareActionProvider




                                                                     Xamarin
                 Copyright 2012 © Xamarin Inc. All rights reserved
Introduction
This session will survey some of the new features
available in Android 4 Ice Cream Sandwich (ICS)


                   Calendar API
                ShareActionProvider
                  Action Bar Tabs




                                                                     Xamarin
                 Copyright 2012 © Xamarin Inc. All rights reserved
Introduction
This session will survey some of the new features
available in Android 4 Ice Cream Sandwich (ICS)


                   Calendar API
                ShareActionProvider
                  Action Bar Tabs
                   TextureView




                                                                     Xamarin
                 Copyright 2012 © Xamarin Inc. All rights reserved
Introduction
This session will survey some of the new features
available 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 Example
Create a message
Android Beam Example
    Create a message
protected 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 message
protected 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 message
protected 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
References



Introduction to Ice Cream Sandwich
http://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

More Related Content

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

Spring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud FoundrySpring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud FoundryJoshua Long
 
Android 101 - Introduction to Android Development
Android 101 - Introduction to Android DevelopmentAndroid 101 - Introduction to Android Development
Android 101 - Introduction to Android DevelopmentAndy Scherzinger
 
Hacking the Codename One Source Code - Part IV - Transcript.pdf
Hacking the Codename One Source Code - Part IV - Transcript.pdfHacking the Codename One Source Code - Part IV - Transcript.pdf
Hacking the Codename One Source Code - Part IV - Transcript.pdfShaiAlmog1
 
A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom Joshua Long
 
Android OS & SDK - Getting Started
Android OS & SDK - Getting StartedAndroid OS & SDK - Getting Started
Android OS & SDK - Getting StartedHemant Chhapoliya
 
Realm database
Realm databaseRealm database
Realm databaseVoneat Pen
 
Xamarin.Mac Introduction
Xamarin.Mac IntroductionXamarin.Mac Introduction
Xamarin.Mac IntroductionMiguel de Icaza
 
Introduction to Xamarin for Visual Studio 2017
Introduction to Xamarin for Visual Studio 2017Introduction to Xamarin for Visual Studio 2017
Introduction to Xamarin for Visual Studio 2017Xamarin
 
OpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino DevelopmentOpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino DevelopmentPaul Withers
 
Visual Studio 2017 Launch Event
Visual Studio 2017 Launch EventVisual Studio 2017 Launch Event
Visual Studio 2017 Launch EventJames Montemagno
 
Creating personalized cross platform mobile apps with the Sitecore Mobile SDK
Creating personalized cross platform mobile apps with the Sitecore Mobile SDKCreating personalized cross platform mobile apps with the Sitecore Mobile SDK
Creating personalized cross platform mobile apps with the Sitecore Mobile SDKMark van Aalst
 
Cloud Function For Firebase - GITS
Cloud Function For Firebase - GITSCloud Function For Firebase - GITS
Cloud Function For Firebase - GITSYatno Sudar
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recieversJagdish Gediya
 
EastBay.net Building Mobile Apps with Xamarin and Visual Studio
EastBay.net Building Mobile Apps with Xamarin and Visual StudioEastBay.net Building Mobile Apps with Xamarin and Visual Studio
EastBay.net Building Mobile Apps with Xamarin and Visual StudioCraig Dunn
 
The TIMES Cloud Service & the TIMES/MIRO App
The TIMES Cloud Service & the TIMES/MIRO AppThe TIMES Cloud Service & the TIMES/MIRO App
The TIMES Cloud Service & the TIMES/MIRO AppIEA-ETSAP
 
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache CordovaHazem Saleh
 
Xamarin UI Test And Xamarin Test Cloud
Xamarin UI Test And Xamarin Test CloudXamarin UI Test And Xamarin Test Cloud
Xamarin UI Test And Xamarin Test CloudEmanuel Amiguinho
 

Similar to Top 5 Features of Ice Cream Sandwich with Mono for Android 4.0 (20)

Spring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud FoundrySpring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud Foundry
 
Android 101 - Introduction to Android Development
Android 101 - Introduction to Android DevelopmentAndroid 101 - Introduction to Android Development
Android 101 - Introduction to Android Development
 
Hacking the Codename One Source Code - Part IV - Transcript.pdf
Hacking the Codename One Source Code - Part IV - Transcript.pdfHacking the Codename One Source Code - Part IV - Transcript.pdf
Hacking the Codename One Source Code - Part IV - Transcript.pdf
 
A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom
 
Android OS & SDK - Getting Started
Android OS & SDK - Getting StartedAndroid OS & SDK - Getting Started
Android OS & SDK - Getting Started
 
Realm database
Realm databaseRealm database
Realm database
 
Xamarin.Mac Introduction
Xamarin.Mac IntroductionXamarin.Mac Introduction
Xamarin.Mac Introduction
 
Introduction to Xamarin for Visual Studio 2017
Introduction to Xamarin for Visual Studio 2017Introduction to Xamarin for Visual Studio 2017
Introduction to Xamarin for Visual Studio 2017
 
OpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino DevelopmentOpenNTF Domino API (ODA): Super-Charging Domino Development
OpenNTF Domino API (ODA): Super-Charging Domino Development
 
Cloud foundry
Cloud foundryCloud foundry
Cloud foundry
 
Visual Studio 2017 Launch Event
Visual Studio 2017 Launch EventVisual Studio 2017 Launch Event
Visual Studio 2017 Launch Event
 
Creating personalized cross platform mobile apps with the Sitecore Mobile SDK
Creating personalized cross platform mobile apps with the Sitecore Mobile SDKCreating personalized cross platform mobile apps with the Sitecore Mobile SDK
Creating personalized cross platform mobile apps with the Sitecore Mobile SDK
 
Cloud Function For Firebase - GITS
Cloud Function For Firebase - GITSCloud Function For Firebase - GITS
Cloud Function For Firebase - GITS
 
Android activity, service, and broadcast recievers
Android activity, service, and broadcast recieversAndroid activity, service, and broadcast recievers
Android activity, service, and broadcast recievers
 
HasGeek Meteor Workshop
HasGeek Meteor WorkshopHasGeek Meteor Workshop
HasGeek Meteor Workshop
 
EastBay.net Building Mobile Apps with Xamarin and Visual Studio
EastBay.net Building Mobile Apps with Xamarin and Visual StudioEastBay.net Building Mobile Apps with Xamarin and Visual Studio
EastBay.net Building Mobile Apps with Xamarin and Visual Studio
 
The TIMES Cloud Service & the TIMES/MIRO App
The TIMES Cloud Service & the TIMES/MIRO AppThe TIMES Cloud Service & the TIMES/MIRO App
The TIMES Cloud Service & the TIMES/MIRO App
 
Refresh controller
Refresh controllerRefresh controller
Refresh controller
 
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
[JMaghreb 2014] Developing JavaScript Mobile Apps Using Apache Cordova
 
Xamarin UI Test And Xamarin Test Cloud
Xamarin UI Test And Xamarin Test CloudXamarin UI Test And Xamarin Test Cloud
Xamarin UI Test And Xamarin Test Cloud
 

More from Xamarin

Xamarin University Presents: Building Your First Intelligent App with Xamarin...
Xamarin University Presents: Building Your First Intelligent App with Xamarin...Xamarin University Presents: Building Your First Intelligent App with Xamarin...
Xamarin University Presents: Building Your First Intelligent App with Xamarin...Xamarin
 
Xamarin University Presents: Ship Better Apps with Visual Studio App Center
Xamarin University Presents: Ship Better Apps with Visual Studio App CenterXamarin University Presents: Ship Better Apps with Visual Studio App Center
Xamarin University Presents: Ship Better Apps with Visual Studio App CenterXamarin
 
Get the Most Out of iOS 11 with Visual Studio Tools for Xamarin
Get the Most Out of iOS 11 with Visual Studio Tools for XamarinGet the Most Out of iOS 11 with Visual Studio Tools for Xamarin
Get the Most Out of iOS 11 with Visual Studio Tools for XamarinXamarin
 
Get the Most out of Android 8 Oreo with Visual Studio Tools for Xamarin
Get the Most out of Android 8 Oreo with Visual Studio Tools for XamarinGet the Most out of Android 8 Oreo with Visual Studio Tools for Xamarin
Get the Most out of Android 8 Oreo with Visual Studio Tools for XamarinXamarin
 
Creative Hacking: Delivering React Native App A/B Testing Using CodePush
Creative Hacking: Delivering React Native App A/B Testing Using CodePushCreative Hacking: Delivering React Native App A/B Testing Using CodePush
Creative Hacking: Delivering React Native App A/B Testing Using CodePushXamarin
 
Build Better Games with Unity and Microsoft Azure
Build Better Games with Unity and Microsoft AzureBuild Better Games with Unity and Microsoft Azure
Build Better Games with Unity and Microsoft AzureXamarin
 
Exploring UrhoSharp 3D with Xamarin Workbooks
Exploring UrhoSharp 3D with Xamarin WorkbooksExploring UrhoSharp 3D with Xamarin Workbooks
Exploring UrhoSharp 3D with Xamarin WorkbooksXamarin
 
Desktop Developer’s Guide to Mobile with Visual Studio Tools for Xamarin
Desktop Developer’s Guide to Mobile with Visual Studio Tools for XamarinDesktop Developer’s Guide to Mobile with Visual Studio Tools for Xamarin
Desktop Developer’s Guide to Mobile with Visual Studio Tools for XamarinXamarin
 
Developer’s Intro to Azure Machine Learning
Developer’s Intro to Azure Machine LearningDeveloper’s Intro to Azure Machine Learning
Developer’s Intro to Azure Machine LearningXamarin
 
Customizing Xamarin.Forms UI
Customizing Xamarin.Forms UICustomizing Xamarin.Forms UI
Customizing Xamarin.Forms UIXamarin
 
Session 4 - Xamarin Partner Program, Events and Resources
Session 4 - Xamarin Partner Program, Events and ResourcesSession 4 - Xamarin Partner Program, Events and Resources
Session 4 - Xamarin Partner Program, Events and ResourcesXamarin
 
Session 3 - Driving Mobile Growth and Profitability
Session 3 - Driving Mobile Growth and ProfitabilitySession 3 - Driving Mobile Growth and Profitability
Session 3 - Driving Mobile Growth and ProfitabilityXamarin
 
Session 2 - Emerging Technologies in your Mobile Practice
Session 2 - Emerging Technologies in your Mobile PracticeSession 2 - Emerging Technologies in your Mobile Practice
Session 2 - Emerging Technologies in your Mobile PracticeXamarin
 
Session 1 - Transformative Opportunities in Mobile and Cloud
Session 1 - Transformative Opportunities in Mobile and Cloud Session 1 - Transformative Opportunities in Mobile and Cloud
Session 1 - Transformative Opportunities in Mobile and Cloud Xamarin
 
SkiaSharp Graphics for Xamarin.Forms
SkiaSharp Graphics for Xamarin.FormsSkiaSharp Graphics for Xamarin.Forms
SkiaSharp Graphics for Xamarin.FormsXamarin
 
Building Games for iOS, macOS, and tvOS with Visual Studio and Azure
Building Games for iOS, macOS, and tvOS with Visual Studio and AzureBuilding Games for iOS, macOS, and tvOS with Visual Studio and Azure
Building Games for iOS, macOS, and tvOS with Visual Studio and AzureXamarin
 
Intro to Xamarin.Forms for Visual Studio 2017
Intro to Xamarin.Forms for Visual Studio 2017Intro to Xamarin.Forms for Visual Studio 2017
Intro to Xamarin.Forms for Visual Studio 2017Xamarin
 
Connected Mobile Apps with Microsoft Azure
Connected Mobile Apps with Microsoft AzureConnected Mobile Apps with Microsoft Azure
Connected Mobile Apps with Microsoft AzureXamarin
 
Building Your First iOS App with Xamarin for Visual Studio
Building Your First iOS App with Xamarin for Visual StudioBuilding Your First iOS App with Xamarin for Visual Studio
Building Your First iOS App with Xamarin for Visual StudioXamarin
 
Building Your First Android App with Xamarin
Building Your First Android App with XamarinBuilding Your First Android App with Xamarin
Building Your First Android App with XamarinXamarin
 

More from Xamarin (20)

Xamarin University Presents: Building Your First Intelligent App with Xamarin...
Xamarin University Presents: Building Your First Intelligent App with Xamarin...Xamarin University Presents: Building Your First Intelligent App with Xamarin...
Xamarin University Presents: Building Your First Intelligent App with Xamarin...
 
Xamarin University Presents: Ship Better Apps with Visual Studio App Center
Xamarin University Presents: Ship Better Apps with Visual Studio App CenterXamarin University Presents: Ship Better Apps with Visual Studio App Center
Xamarin University Presents: Ship Better Apps with Visual Studio App Center
 
Get the Most Out of iOS 11 with Visual Studio Tools for Xamarin
Get the Most Out of iOS 11 with Visual Studio Tools for XamarinGet the Most Out of iOS 11 with Visual Studio Tools for Xamarin
Get the Most Out of iOS 11 with Visual Studio Tools for Xamarin
 
Get the Most out of Android 8 Oreo with Visual Studio Tools for Xamarin
Get the Most out of Android 8 Oreo with Visual Studio Tools for XamarinGet the Most out of Android 8 Oreo with Visual Studio Tools for Xamarin
Get the Most out of Android 8 Oreo with Visual Studio Tools for Xamarin
 
Creative Hacking: Delivering React Native App A/B Testing Using CodePush
Creative Hacking: Delivering React Native App A/B Testing Using CodePushCreative Hacking: Delivering React Native App A/B Testing Using CodePush
Creative Hacking: Delivering React Native App A/B Testing Using CodePush
 
Build Better Games with Unity and Microsoft Azure
Build Better Games with Unity and Microsoft AzureBuild Better Games with Unity and Microsoft Azure
Build Better Games with Unity and Microsoft Azure
 
Exploring UrhoSharp 3D with Xamarin Workbooks
Exploring UrhoSharp 3D with Xamarin WorkbooksExploring UrhoSharp 3D with Xamarin Workbooks
Exploring UrhoSharp 3D with Xamarin Workbooks
 
Desktop Developer’s Guide to Mobile with Visual Studio Tools for Xamarin
Desktop Developer’s Guide to Mobile with Visual Studio Tools for XamarinDesktop Developer’s Guide to Mobile with Visual Studio Tools for Xamarin
Desktop Developer’s Guide to Mobile with Visual Studio Tools for Xamarin
 
Developer’s Intro to Azure Machine Learning
Developer’s Intro to Azure Machine LearningDeveloper’s Intro to Azure Machine Learning
Developer’s Intro to Azure Machine Learning
 
Customizing Xamarin.Forms UI
Customizing Xamarin.Forms UICustomizing Xamarin.Forms UI
Customizing Xamarin.Forms UI
 
Session 4 - Xamarin Partner Program, Events and Resources
Session 4 - Xamarin Partner Program, Events and ResourcesSession 4 - Xamarin Partner Program, Events and Resources
Session 4 - Xamarin Partner Program, Events and Resources
 
Session 3 - Driving Mobile Growth and Profitability
Session 3 - Driving Mobile Growth and ProfitabilitySession 3 - Driving Mobile Growth and Profitability
Session 3 - Driving Mobile Growth and Profitability
 
Session 2 - Emerging Technologies in your Mobile Practice
Session 2 - Emerging Technologies in your Mobile PracticeSession 2 - Emerging Technologies in your Mobile Practice
Session 2 - Emerging Technologies in your Mobile Practice
 
Session 1 - Transformative Opportunities in Mobile and Cloud
Session 1 - Transformative Opportunities in Mobile and Cloud Session 1 - Transformative Opportunities in Mobile and Cloud
Session 1 - Transformative Opportunities in Mobile and Cloud
 
SkiaSharp Graphics for Xamarin.Forms
SkiaSharp Graphics for Xamarin.FormsSkiaSharp Graphics for Xamarin.Forms
SkiaSharp Graphics for Xamarin.Forms
 
Building Games for iOS, macOS, and tvOS with Visual Studio and Azure
Building Games for iOS, macOS, and tvOS with Visual Studio and AzureBuilding Games for iOS, macOS, and tvOS with Visual Studio and Azure
Building Games for iOS, macOS, and tvOS with Visual Studio and Azure
 
Intro to Xamarin.Forms for Visual Studio 2017
Intro to Xamarin.Forms for Visual Studio 2017Intro to Xamarin.Forms for Visual Studio 2017
Intro to Xamarin.Forms for Visual Studio 2017
 
Connected Mobile Apps with Microsoft Azure
Connected Mobile Apps with Microsoft AzureConnected Mobile Apps with Microsoft Azure
Connected Mobile Apps with Microsoft Azure
 
Building Your First iOS App with Xamarin for Visual Studio
Building Your First iOS App with Xamarin for Visual StudioBuilding Your First iOS App with Xamarin for Visual Studio
Building Your First iOS App with Xamarin for Visual Studio
 
Building Your First Android App with Xamarin
Building Your First Android App with XamarinBuilding Your First Android App with Xamarin
Building Your First Android App with Xamarin
 

Recently uploaded

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 

Recently uploaded (20)

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 

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

  • 1. Xamarin Seminar 9th February 2012 Copyright 2012 © Xamarin Inc. All rights reserved
  • 2. Agenda Top 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. Introduction This session will survey some of the new features available in Android 4 Ice Cream Sandwich (ICS) Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  • 4. Introduction This session will survey some of the new features available in Android 4 Ice Cream Sandwich (ICS) Calendar API Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  • 5. Introduction This session will survey some of the new features available in Android 4 Ice Cream Sandwich (ICS) Calendar API ShareActionProvider Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  • 6. Introduction This session will survey some of the new features available in Android 4 Ice Cream Sandwich (ICS) Calendar API ShareActionProvider Action Bar Tabs Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  • 7. Introduction This session will survey some of the new features available in Android 4 Ice Cream Sandwich (ICS) Calendar API ShareActionProvider Action Bar Tabs TextureView Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  • 8. Introduction This session will survey some of the new features available in Android 4 Ice Cream Sandwich (ICS) Calendar API ShareActionProvider Action Bar Tabs TextureView Android Beam Xamarin Copyright 2012 © Xamarin Inc. All rights reserved
  • 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
  • 16. Calendar Demo • Listing Calendars
  • 17. Calendar Demo • Listing Calendars • Listing Calendar Events
  • 18. Calendar Demo • Listing Calendars • Listing Calendar Events • Adding an Event
  • 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
  • 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;
  • 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
  • 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; } ... }
  • 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
  • 48. Android Beam Example Create a message protected 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 message protected 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 message protected 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; }
  • 52. References Introduction to Ice Cream Sandwich http://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

Editor's Notes

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n