5. 3D Touch
Easy to use API2
No ability to test in iOS Simulator3
Unique to iPhone 6S1
6. Does the device support this goodness?
public override void ViewDidLoad ()
{
base.ViewDidLoad ();
// Check to see if 3D Touch is available
if (TraitCollection.ForceTouchCapability == UIForceTouchCapability.Available) {
// Do something with the 3D Touch availability
...
}
}
7. How do I peek?
UIViewControllerPreviewingDelegate
public override UIViewController GetViewControllerForPreview (IUIViewControllerPreviewing previewingContext, CGPo
{
//Simply return the view controller you want to peek into
}
9. Multitasking for iPad
Split View
The user can pick a second app
and run it side-by-side with the
currently running app
10. Multitasking for iPad
Slide Over
Width: 507
Height:768
Split View
The user can pick a second app
and run it side-by-side with the
currently running app
14. Multitasking for iPad Checklist
LaunchScreen is a storyboard file2
Add auto layouts to all of your views3
Build against iOS 9 (or greater)1
Support all 4 iOS device orientations4
15. I want all the resources!!
UIRequiresFullScreen = YES
16. Search
• App content is made searchable
• Allows users to access activities
and information from deep
within your app
17. Public Index Private Index
Index data and put it on
Apple’s public server
Index data to be stored
privately on the device
19. Why Prepare for Search?
Increased
Discoverability
Improved
User Experience
More
Downloads
20. var activity = new NSUserActivity("com.xamarin.searchdemo.monkey");
activity.EligibleForSearch = true;
activity.EligibleForPublicIndexing = true;
activity.Title = Monkey.Name;
activity.AddUserInfoEntries(NSDictionary.FromObjectAndKey(
new NSString(Monkey.Name), new NSString("Name")));
var keywords = new NSString[] { new NSString(Monkey.Name),
new NSString("Monkey"), new NSString("monkey") };
activity.Keywords = new NSSet<NSString>(keywords);
activity.ContentAttributeSet = new CoreSpotlight.CSSearchableItemAttribute
Set(Monkey.Details);
activity.BecomeCurrent ();
21. Contacts and ContactsUI
• AddressBook and
AddressBookUI have
been deprecated
• Contacts and ContactsUI
are new, simpler
frameworks
22. A stack of subviews that
dynamically responds to the iOS
device's orientation and screen
size
New Stack View
32. Old System – During Install
– Disadvantages:
• Prevents auto updates
• Out-of-context
• Lower user-engagement
– Advantage
• Total Developer Freedom!
33. New System - Runtime
– Disadvantages
• Developer must deal with
refusal/revoked permissions
– Advantages:
• Contextualized
permissions
• Users in control
34. What you must ask for
Calendar Camera Contacts
Location Microphone Phone
Sensors SMS Storage
(API 23+)
35. What you get
Bluetooth Internet Network State
NFC Vibrate Settings
Flashlight Accounts Alarm
…
Declared in Application Manifest
36. Requesting Permission
bool RequestPermission()
{
const string permission = Manifest.Permission.AccessFineLocation;
if (CheckSelfPermission(permission) == (int)Permission.Granted)
return true;
if (ShouldShowRequestPermissionRationale(permission))
{
//Explain to the user why we need to read the contacts
}
RequestPermissions(new []{permission} , RequestLocationId);
}
45. void StartVoiceTrigger()
{
if (!Activity.IsVoiceInteraction)
return;
var option = new VoiceInteractor.PickOptionRequest.Option("Cheese", 1);
option.AddSynonym("ready");
option.AddSynonym("go");
option.AddSynonym("take it");
option.AddSynonym("ok");
var prompt = new VoiceInteractor.Prompt("Say Cheese");
Activity.VoiceInteractor.SubmitRequest(new ChoiceRequest(this, prompt, new []{ option }));
}
46.
47. Fingerprint API
– FingerprintManager
• Authenticate(Signature cryptoObject,
AuthenticationCallback callback)
– Uses KeyStore for cyrpto keys
– Must provide user interface
– Per Transaction
– Required Permission:
48. Confirm Credential
– Check how recently user has unlocked phone
– Authenticate only when needed
– Utilizes Device Lock Screen
– Defines Crypto Key Timeout Policy
– Sync timeouts across apps
49. Direct Share
– Intuitive & Quick Sharing
– Launch specific activity
– Example:
• Share text directly to a specific friend
or community
50. Material
Design
Updates
1 Year of Material Design
google.com/design/spec/material-design/introduction.html
Bold, graphic, intentionalMaterial metaphor Motion provides meaning
58. What’s new in Google Play Services
– GPS 7.5
• App Invites
• Google Fit
• Android Wear Maps
• GCM Updates
• Smart Lock & Cast
– GPS 7.8
• Nearby Messages
• Mobile Vision API
• More GCM Updates
59. App Invites
– Allow users to share apps
– Email or SMS
– Deep Link Content
– Provide exclusive content
60. Mobile Vision API
– FaceDectector: Find faces in
any orientation
– Barcode API: real-time, on
device, any orientation
63. Marshmallow Checklist
– Think about permission workflow
– Be aware of Doze & App Standby
– Consider porting app to AppCompat
– Utilize new Google Play Services Features
69. Introducing Xamarin.UITest
Create Automated User Interface
tests all in C#
Upload to the Test Cloud or run
against a Device or Simulator
Run directly from Visual Studio or
Xamarin Studio
Exposed via a NuGet Package
FREE to use a Simulator*
Works on ANY app: Native, Hybrid, or
Xamarin
70. Long Cycles
Rapid
Iterations
High Test Realism
Simplistic Tests
Beta Testing
Manual
Testing
Automated UI
Testing
Unit Testing
How we are testing
Automated UI testing is the
only way to ensure your
app
• looks
• behaves and
• performs
well on a broad set of
devices—
with every release
75. Xamarin.Insights – Realtime monitoring
• Supports
– Xamarin.iOS
– Xamarin.Android
– Xamarin.Mac
– Windows Phone
– Windows Store
– Windows Desktop
• Currently in preview
81. Start immediately
Dedicated QA engineers get you up and
running with Xamarin Test Cloud fast
Hundreds of devices
Be confident that your apps function
correctly and look great on real devices
Continuous Integration
Integrate Xamarin Test Cloud into your
continuous integration process or ALM
Beautiful reports
More than detailed technical feedback,
stunning visual reporting performance
monitoring
Test for fragmentation
Test automatically on hundreds of
combinations of operation systems,
screens and resolutions
Object-based UI testing
Test your entire app, from the UI down,
using object-level user interface testing
Find bugs before your users do
82. Mobile Quality Matters
• Mobile != Desktop Development
• Iterate quickly, but don’t turn your users into beta testers.
• Use Insights to Improve Apps
• xamarin.com/insights
• xamarin.com/test-cloud
Editor's Notes
Since Android is much more than just the core OS.
In fact there are three main areas that are brand new and updated in Android.
From the API point of view there are 4 big new features.
First is runtime permissions, which fundamentally change how you build your Android applications.
In the past we had complete freedom. We went in and specified what permissions we wanted and we were good to go. This of course lead to there being over 130 different permissions in Android and users had no idea what they were.
The new system, Runtime Permsissions change all of that as you must request and handle refusal for specific permsissions. This is very similar to iOS
We have to ask for 9 specific types of permissions. These are actually “groups” of permissions that you can request. For Contacts everything is bundled into the “Contacts” group for read/write/update. So these 9 permissions are actually 25 permissions.
But don’t’ worry, not for everything, if you don’t see it in the previous list you are all good to just declare these in application manifest files.
Requesting and the dialogs are handled for use by the system. You simply CheckSelfPermission every time to see if the permission was granted. If the sure has denied it a bunch of times you will get a “true” on ShouldShowRequestPermissionRationale and you can show some toast or a snackbar dialog, then finally request the permission or permissions you want.
When the user responds you get a nice callback letting you know if they granted or denied you access.
Unfortunately, you must check every time as users can now revoke access later. This will probably be rare, but is possible.
Often you have permissions that you MUST have to even run your application. Perhaps location, or for Google Hangouts it must have SMS access. This is where a cold start or walkthrough is nice to implement and force them to allow the permissions.
You can extend your Android Applications in several ways with Widgets, background services, and intents, but what about allowing your users to talk to your app?
Introduction Voice Interactions. A simple API to allow you to extend you app and allow your users to speak to it!
Extending existing Voice Actions that exist today using Google Now users will be able to launch directly into your application. Here is a sample of a few of the existing voice actions that the system provides.
If you already were using these actions, simply add in a CategoryVoice and you are ready to implement.
Each voice interaction has an Interactor with a series of requests that you can make. For instance you may want to have a “Choice” of how to take a picture. Here there we create our PickOptionRequest and handle the option selected or cancelation.
Then when our Intent is launched we can check against the Activity to see if it was started by a VoiceInteraction and prompt our user for more information.
The Fingerprint API is very similar to Touch ID on iOS allowing you to create a cyrpto key based on the fingerprint of your user. This is usually on a per transaction or login action.
Confirm credential is a bit different, and leverages the finger print readers or lock screen to allow you to check when the last time the user unlocked the screen. You can specify an amount of time and perform an action based off of that. If it has timedout you can prompt the confirm credential screen to continue on.
Direct share is a new and interesting API. Usually when your app says it can receive Text or a Photo there isn’t much else you can tell Android about what action will be performed. However, with Direct Share you can extend these intents and specify deep links to specific activities or options that will be launched. For instancesharing text to specific users of your app.
Some great things that have to be mentioned as an overall Android enhancement is all of the great thing in material design. In fact it has been over a year since Material Design took over the world and there are nice new specs to help deal with these changes.
Only available in Android L Developer Preview
Need to bring material design back to older devices? No worries the Support Libraries are your friends! Including the new Support Design Library.
Available in Android.Support.v7 library from NuGet there are several widgets included, here are a few of my favorite.
A nice simplified NavigationView and Drawer all handled by MenuItems
Specify groups and items and they just are laid out easily and efficiently
Enhance your toast with an interactive Snackbar!
Of course everyone’s favorite Floating Action button is now available as well.
There are tons of new great APIs now up to GPS 7.8! Here are a few that I really like
A really cool extension is App Invites essentially allowing you to invite friends to use your iOS and Android applications via SMS and Email
Mobile vision is really cool for Face Dection and high speed barcode scanning
On the Xamarin side, they have completely re-structured how GPS is delivered to you. Each Api is in it’s own separate NuGet package allow you to pick and choose what you would like.
Let’s talk about some core operating system changes coming in Marshmallow, both Doze and App Standby
There you have it! To wrap it up here are a few considerations for the next release of Android
Xamarin Introduction!
Xamarin truly is your entire mobile solution when it comes to app development, testing, and analysis.
The Xamarin Platform is usually what we talk about which is where you can leverage your C# and .NET Skills and Libraries to build native iOS, Android, and Mac apps and share your business logic code with Windows from inside of Visual Studio or Xamarin Studio.
Xamarin Test Cloud, which we will talk about tonight enables you to find bugs before your users do by allowing you to create automated user interface scripts to run locally or see them run on hundreds upon hundreds of physical iOS and Android devices.
Finally, there is Xamarin Insights for real time app monitoring to see you your app is doing and get detailed crash reports with just a single line of code.
To learn all of this Xamarin offers Xamarin University a live and interactive year round training program where you can become a fully certified Xamarin mobile developer.
OpenSignal is a global app that publishes an annual report on Android device fragmentation based on the distinct Android device types that download their app. This is their August 2014 data, with an astonishing 19,000 device types using their app, up by 60% from just last year.
Different device operating systems, form factors, screen sizes, resolutions, chip sets, and manufacturer modifications make it difficult to know that your app will work well on all devices
Surveying businesses out there we often find that the “normal” test suite is actually only 10 devices across all mobile operating systems. In addition most code coverage for business logic comes in under 20% and only a quarter of companies are using CI in their development cycle. So how can we improve quality and increase these numbers?
An approach that has proved successful is the “Shift Left” model, which says let’s start business logic and UI testing at the very start of development. From the very first screen that we create so as we continue to release our quality is extremely high and we only need to write new tests, not play catch up.
This is where Xamarin.UITest comes in to help with this shift. Xamarin.UITest is a framework that ties in directly to the Nunit testing framework to write the UI tests. You can even run them directly against a simulator for free to do regression tests on your applications.
There are several different ways to test mobile applications.
We can have extensive beta tests with our users, which is good for hands on, but hard to get feedback.
We can spend hours upon hours manually testing which can help find bugs, but can bog down developers.
Unit testing is essential for our business logic, but only Automated UI Testing can really ensure that as we add new features and fix bugs our UI isn’t impacted before we release.
We can take our tests and ship them to the Test Cloud to see them run on hundred of physical iOS and Android devices..
You can even see the market share and pick what devices you care about.
Then you can integrate it into your CI system to ensure that before you ship your app nothing has regressed.
How about after we ship our app to the app stores? How do we monitor performance, crashes, and analytics? Well Xamarin has a solution for all of our apps with Xamarin Insights.
Xamarin.Insights, currently in preview, enables us to support all of our apps from a full cross platform API.
Automatic MANAGED and NATIVE exceptions are caught with just a single line of code.
You of course can report additional caught exceptions so you can see where things are going wrong.
Track to see what is being used the most in your apps, but also use tracking to build up your very own reproduction steps when a crash does occur.
If you are in an enterprise you can actually Identify your users so you can see who’s app crashed, get specifics about the device, and email them immediately when you fix a bug.
When tracking any data like this you should of course tell your users. We all should be responsible developers when it comes to privacy.
Most important of course if getting alerts. Xamarin Insights has full email alerts, but you can also integrate into popular services for mission critical notifications.