SlideShare una empresa de Scribd logo
1 de 16
Descargar para leer sin conexión
Jonathan Pryor
Xamarin.Android Lead
Xamarin
jonp@xamarin.com
What’s New in
Xamarin.Android
What’s in Xamarin.Android
IDE
Runtime
Java library binding
Packaging
Unified Components
•
•
•
•
•
Visual Studio
Layout Editor
Non-Modal Deployment
Target Selection
•
•
•
Released
Xamarin Studio
Layout Editor
Razor HTML Generator
•
•
Released
Runtime: New Foundation
Mono 3.0 base, includes most .NET 4.5 APIs
Stream.ReadAsync(), System.Net.Http.dll
“Breaking” Change on OS X:
new Java.Lang.Object() // CS1540
Xamarin.Android ≤ 4.6: “Silverlight” based
Xamarin.Android ≥ 4.7: .NET 4.5-based -
System.Configuration
•
•
•
•
•
Beta
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Runtime: C#4 Dynamic
var books = @"<books pubdate='2009-05-20'>
<book price='45.99' title='Open Heart Surgery for Dummies'>
<authors>
<author>
<name><first>Mortimer</first><last>Snerdly</last></name>
<email address='mort@surgery.com'/>
</author>
</authors>
</book>
</book>";
dynamic dx = new DynamicXml(books);
Console.WriteLine("Book list publication date='{0}'", dx.pubdate.Value);
Console.WriteLine(" Book count='{0}'", dx.book.Count);
Console.WriteLine(" first book title='{0}'", dx.book[0].title.Value);
Console.WriteLine(" first book price='{0}'", dx.book[0].price.Value);
Console.WriteLine(" first book authors count='{0}'", dx.book[0].author.Count);
// Output:
// Book list publication date='2009-05-20'
// Book count='1'
// first book title='Open Heart Surgery for Dummies'
// first book price='45.99'
// first book authors count='1'
http://blogs.captechconsulting.com/blog/kevin-hazzard/fluent-xml-parsing-using-cs-dynamic-type-part-1
Released
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Runtime: C#4 Variant Generics
interface IEnumerable<out T> : IEnumerable {
new IEnumerator<T> GetEnumerator ();
}
interface IEnumerator<out T> : IDisposable, IEnumerator {
new T Current {get;}
}
void Cat (IEnumerable<Stream> streams, Stream destination)
{
foreach (var stream in streams)
stream.CopyTo (destination);
}
Cat (new List<MemoryStream> {}, Stream.Null); // CS0266 in C#3
Cat (new List<FileStream> {}, Stream.Null); // CS0266 in C#3
Beta
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Runtime: C# < 5
// Old and busted
GetUserAsync ("migueldeicaza").ContinueWith (t =>
PostStatusAsync (t.Result, "Having an awesome time at #Xamarin Evolve!")
).Unwrap().ContinueWith (t => {
if (t.IsFaulted) {
ShowError (t.Exception.Flatten().InnerException);
return;
}
UpdateUI();
}, TaskScheduler.FromCurrentSynchronizationContext());
Released
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Runtime: C#5 Async
// New Hawtness
try {
var user = await GetUserAsync ("migueldeicaza");
await PostStatusAsync (user, "Having an awesome time at #Xamarin Evolve!");
UpdateUI();
}
catch (Exception ex) {
ShowError (ex);
}
Beta
Runtime: New Features
New default ARM ABI: armeabi-v7a (armv7)
F# support
Profiling [Beta!]
$ adb shell setprop 
debug.mono.profile log:sample
# Run app on device...
$ adb pull 
/data/.../files/.__override__/profile.mlpd
$ mprof-report profile.mlpd | less
•
•
•
Beta
Released
Binding Improvements
Expose more of the Java API
Embed Java libraries into assemblies
Build action: EmbeddedJar, EmbeddedReferenceJar
Java Library Project support
project.properties file
(Build action: LibraryProjectProperties)
library.zip file
(Build action: LibraryProjectZip)
•
•
•
•
•
•
Beta
Released
Released
What’s new in App Packaging?
Native library remapping (provide .dll.config)
Bundle assemblies into native code
Satellite Assemblies
Environment support (Build action: AndroidEnvironment)
# Comments
ENV_VAR=env-value
debug.mono.log=gref
debug.mono.env=MONO_LOG_LEVEL=debug
•
•
•
•
Released
Beta
Beta
Packaging: Library Resources
Library project assemblies may contain:
Android Resources (Build action: AndroidResource)
Native libraries (Build action: EmbeddedNativeLibrary)
Problem: default Library template may not support Android
Resources.
Solution: Hack it
Create a new Android Application project
Edit .csproj
Remove <AndroidApplication/> element.
Reopen project.
•
•
•
•
•
1.
2.
3.
4.
Beta
Released
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Packaging: [Export]
<!-- ResourceslayoutMain.axml -->
<Button
android:id="@+id/myButton"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello"
android:onClick="MyButton_OnClick" />
// MyActivity.cs
namespace MyApp {
public partial class MyActivity : Activity
{
[Java.Interop.Export]
public void MyButton_OnClick (View view)
{
((Button) view).Text = "clicked!";
}
}
}
Released
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
Packaging: AndroidInterfaceDescription
// AIDL
package com.android.vending.billing;
import android.os.Bundle;
interface IMarketBillingService {
/** Given the arguments in bundle form, returns a bundle for results. */
Bundle sendBillingRequest(in Bundle bundle);
}
// C# generated code
interface IMarketBillingService : Android.OS.IInterface {
Android.OS.Bundle SendBillingRequest (Android.OS.Bundle bundle);
}
abstract class IMarketBillingServiceStub : Binder, IInterface, IMarketBillingService {
public abstract Bundle SendBillingRequest (Bundle bundle);
public partial class Proxy : Java.Lang.Object, IMarketBillingService {}
}
Released
Unified Components
Component Assembly may contain:
ECMA CIL (code)
ECMA Resources (Build action: EmbeddedResource)
Android Resources (Build action: AndroidResource)
Native libraries
Allows entire components to be shipped as single assembly, like
Xamarin.iOS
•
•
•
•
•
•
Released
Released
Released
Beta

Más contenido relacionado

La actualidad más candente

ASP.NET 4.0
ASP.NET 4.0ASP.NET 4.0
ASP.NET 4.0
XeDotNet
 
How Shopify Scales Rails
How Shopify Scales RailsHow Shopify Scales Rails
How Shopify Scales Rails
jduff
 

La actualidad más candente (20)

Alfresco Process Services extension project - Alfresco DevCon 2018
Alfresco Process Services extension project - Alfresco DevCon 2018Alfresco Process Services extension project - Alfresco DevCon 2018
Alfresco Process Services extension project - Alfresco DevCon 2018
 
MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5 MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5
 
Super Fast Application development with Mura CMS
Super Fast Application development with Mura CMSSuper Fast Application development with Mura CMS
Super Fast Application development with Mura CMS
 
Workflows and Digital Signatures
Workflows and Digital SignaturesWorkflows and Digital Signatures
Workflows and Digital Signatures
 
ASP.NET 4.0
ASP.NET 4.0ASP.NET 4.0
ASP.NET 4.0
 
php[world] 2015 Training - Laravel from the Ground Up
php[world] 2015 Training - Laravel from the Ground Upphp[world] 2015 Training - Laravel from the Ground Up
php[world] 2015 Training - Laravel from the Ground Up
 
How Shopify Scales Rails
How Shopify Scales RailsHow Shopify Scales Rails
How Shopify Scales Rails
 
Bring api manager into your stack
Bring api manager into your stackBring api manager into your stack
Bring api manager into your stack
 
All the Laravel things: up and running to making $$
All the Laravel things: up and running to making $$All the Laravel things: up and running to making $$
All the Laravel things: up and running to making $$
 
Selenium Tips & Tricks - StarWest 2015
Selenium Tips & Tricks - StarWest 2015Selenium Tips & Tricks - StarWest 2015
Selenium Tips & Tricks - StarWest 2015
 
Fluxible
FluxibleFluxible
Fluxible
 
Dependency Injection
Dependency InjectionDependency Injection
Dependency Injection
 
Extending burp with python
Extending burp with pythonExtending burp with python
Extending burp with python
 
Advanced Server Integration with Data and Direct
Advanced Server Integration with Data and DirectAdvanced Server Integration with Data and Direct
Advanced Server Integration with Data and Direct
 
"Design First" APIs with Swagger
"Design First" APIs with Swagger"Design First" APIs with Swagger
"Design First" APIs with Swagger
 
10 Reasons ColdFusion PDFs should rule the world
10 Reasons ColdFusion PDFs should rule the world10 Reasons ColdFusion PDFs should rule the world
10 Reasons ColdFusion PDFs should rule the world
 
Laravel 5 New Features
Laravel 5 New FeaturesLaravel 5 New Features
Laravel 5 New Features
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescue
 
SymfonyCon Cluj 2017 - Symfony at OpenSky
SymfonyCon Cluj 2017 - Symfony at OpenSkySymfonyCon Cluj 2017 - Symfony at OpenSky
SymfonyCon Cluj 2017 - Symfony at OpenSky
 
Securing applications
Securing applicationsSecuring applications
Securing applications
 

Similar a What's new in xamarin.android, Jonathan Pryor

Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
NAVER D2
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
catherinewall
 

Similar a What's new in xamarin.android, Jonathan Pryor (20)

Android 101 - Introduction to Android Development
Android 101 - Introduction to Android DevelopmentAndroid 101 - Introduction to Android Development
Android 101 - Introduction to Android Development
 
Introduction to Play Framework
Introduction to Play FrameworkIntroduction to Play Framework
Introduction to Play Framework
 
Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]Java script nirvana in netbeans [con5679]
Java script nirvana in netbeans [con5679]
 
Node.js Development with Apache NetBeans
Node.js Development with Apache NetBeansNode.js Development with Apache NetBeans
Node.js Development with Apache NetBeans
 
Writing Android Libraries
Writing Android LibrariesWriting Android Libraries
Writing Android Libraries
 
Kandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_finalKandroid for nhn_deview_20131013_v5_final
Kandroid for nhn_deview_20131013_v5_final
 
Useful practices of creation automatic tests by using cucumber jvm
Useful practices of creation automatic tests by using cucumber jvmUseful practices of creation automatic tests by using cucumber jvm
Useful practices of creation automatic tests by using cucumber jvm
 
Introduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud RunIntroduction to JIB and Google Cloud Run
Introduction to JIB and Google Cloud Run
 
Plugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGemsPlugin-based software design with Ruby and RubyGems
Plugin-based software design with Ruby and RubyGems
 
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
Getting Started with Rails on GlassFish (Hands-on Lab) - Spark IT 2010
 
Cannibalising The Google App Engine
Cannibalising The  Google  App  EngineCannibalising The  Google  App  Engine
Cannibalising The Google App Engine
 
Spring MVC framework
Spring MVC frameworkSpring MVC framework
Spring MVC framework
 
JavaScript Modules Done Right
JavaScript Modules Done RightJavaScript Modules Done Right
JavaScript Modules Done Right
 
Custom Buildpacks and Data Services
Custom Buildpacks and Data ServicesCustom Buildpacks and Data Services
Custom Buildpacks and Data Services
 
Core Android
Core AndroidCore Android
Core Android
 
Introduction to java
Introduction to java Introduction to java
Introduction to java
 
Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundry
 
[2015/2016] Apache Cordova
[2015/2016] Apache Cordova[2015/2016] Apache Cordova
[2015/2016] Apache Cordova
 
Monkey space 2013
Monkey space 2013Monkey space 2013
Monkey space 2013
 
Xamarin.Forms Bootcamp
Xamarin.Forms BootcampXamarin.Forms Bootcamp
Xamarin.Forms Bootcamp
 

Más de Xamarin

Más de 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
 
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
 
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
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 

What's new in xamarin.android, Jonathan Pryor

  • 2. What’s in Xamarin.Android IDE Runtime Java library binding Packaging Unified Components • • • • •
  • 3. Visual Studio Layout Editor Non-Modal Deployment Target Selection • • • Released
  • 4. Xamarin Studio Layout Editor Razor HTML Generator • • Released
  • 5. Runtime: New Foundation Mono 3.0 base, includes most .NET 4.5 APIs Stream.ReadAsync(), System.Net.Http.dll “Breaking” Change on OS X: new Java.Lang.Object() // CS1540 Xamarin.Android ≤ 4.6: “Silverlight” based Xamarin.Android ≥ 4.7: .NET 4.5-based - System.Configuration • • • • • Beta
  • 6. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Runtime: C#4 Dynamic var books = @"<books pubdate='2009-05-20'> <book price='45.99' title='Open Heart Surgery for Dummies'> <authors> <author> <name><first>Mortimer</first><last>Snerdly</last></name> <email address='mort@surgery.com'/> </author> </authors> </book> </book>"; dynamic dx = new DynamicXml(books); Console.WriteLine("Book list publication date='{0}'", dx.pubdate.Value); Console.WriteLine(" Book count='{0}'", dx.book.Count); Console.WriteLine(" first book title='{0}'", dx.book[0].title.Value); Console.WriteLine(" first book price='{0}'", dx.book[0].price.Value); Console.WriteLine(" first book authors count='{0}'", dx.book[0].author.Count); // Output: // Book list publication date='2009-05-20' // Book count='1' // first book title='Open Heart Surgery for Dummies' // first book price='45.99' // first book authors count='1' http://blogs.captechconsulting.com/blog/kevin-hazzard/fluent-xml-parsing-using-cs-dynamic-type-part-1 Released
  • 7. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Runtime: C#4 Variant Generics interface IEnumerable<out T> : IEnumerable { new IEnumerator<T> GetEnumerator (); } interface IEnumerator<out T> : IDisposable, IEnumerator { new T Current {get;} } void Cat (IEnumerable<Stream> streams, Stream destination) { foreach (var stream in streams) stream.CopyTo (destination); } Cat (new List<MemoryStream> {}, Stream.Null); // CS0266 in C#3 Cat (new List<FileStream> {}, Stream.Null); // CS0266 in C#3 Beta
  • 8. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Runtime: C# < 5 // Old and busted GetUserAsync ("migueldeicaza").ContinueWith (t => PostStatusAsync (t.Result, "Having an awesome time at #Xamarin Evolve!") ).Unwrap().ContinueWith (t => { if (t.IsFaulted) { ShowError (t.Exception.Flatten().InnerException); return; } UpdateUI(); }, TaskScheduler.FromCurrentSynchronizationContext()); Released
  • 9. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Runtime: C#5 Async // New Hawtness try { var user = await GetUserAsync ("migueldeicaza"); await PostStatusAsync (user, "Having an awesome time at #Xamarin Evolve!"); UpdateUI(); } catch (Exception ex) { ShowError (ex); } Beta
  • 10. Runtime: New Features New default ARM ABI: armeabi-v7a (armv7) F# support Profiling [Beta!] $ adb shell setprop debug.mono.profile log:sample # Run app on device... $ adb pull /data/.../files/.__override__/profile.mlpd $ mprof-report profile.mlpd | less • • • Beta Released
  • 11. Binding Improvements Expose more of the Java API Embed Java libraries into assemblies Build action: EmbeddedJar, EmbeddedReferenceJar Java Library Project support project.properties file (Build action: LibraryProjectProperties) library.zip file (Build action: LibraryProjectZip) • • • • • • Beta Released Released
  • 12. What’s new in App Packaging? Native library remapping (provide .dll.config) Bundle assemblies into native code Satellite Assemblies Environment support (Build action: AndroidEnvironment) # Comments ENV_VAR=env-value debug.mono.log=gref debug.mono.env=MONO_LOG_LEVEL=debug • • • • Released Beta Beta
  • 13. Packaging: Library Resources Library project assemblies may contain: Android Resources (Build action: AndroidResource) Native libraries (Build action: EmbeddedNativeLibrary) Problem: default Library template may not support Android Resources. Solution: Hack it Create a new Android Application project Edit .csproj Remove <AndroidApplication/> element. Reopen project. • • • • • 1. 2. 3. 4. Beta Released
  • 14. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Packaging: [Export] <!-- ResourceslayoutMain.axml --> <Button android:id="@+id/myButton" android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello" android:onClick="MyButton_OnClick" /> // MyActivity.cs namespace MyApp { public partial class MyActivity : Activity { [Java.Interop.Export] public void MyButton_OnClick (View view) { ((Button) view).Text = "clicked!"; } } } Released
  • 15. 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 Packaging: AndroidInterfaceDescription // AIDL package com.android.vending.billing; import android.os.Bundle; interface IMarketBillingService { /** Given the arguments in bundle form, returns a bundle for results. */ Bundle sendBillingRequest(in Bundle bundle); } // C# generated code interface IMarketBillingService : Android.OS.IInterface { Android.OS.Bundle SendBillingRequest (Android.OS.Bundle bundle); } abstract class IMarketBillingServiceStub : Binder, IInterface, IMarketBillingService { public abstract Bundle SendBillingRequest (Bundle bundle); public partial class Proxy : Java.Lang.Object, IMarketBillingService {} } Released
  • 16. Unified Components Component Assembly may contain: ECMA CIL (code) ECMA Resources (Build action: EmbeddedResource) Android Resources (Build action: AndroidResource) Native libraries Allows entire components to be shipped as single assembly, like Xamarin.iOS • • • • • • Released Released Released Beta