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

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Recently uploaded (20)

Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

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