Vaughan Knight App Ecosystem Lead Microsoft Graphics enhancements D2D/DWrite FileOpenPicke FileOpenPicker, r, FileSavePicker FileSavePicker Read/Write access to SD card Appointments/ Appointments Calendar API /Calendar API enhancements Appointments/ Appointments Calendar /Calendar brokered UI Data Sense 2 AtomPub, AtomPub, Http, Http, Syndication (Windows.Web) (Windows.We b) Data.XML Audio effects.

Download Report

Transcript Vaughan Knight App Ecosystem Lead Microsoft Graphics enhancements D2D/DWrite FileOpenPicke FileOpenPicker, r, FileSavePicker FileSavePicker Read/Write access to SD card Appointments/ Appointments Calendar API /Calendar API enhancements Appointments/ Appointments Calendar /Calendar brokered UI Data Sense 2 AtomPub, AtomPub, Http, Http, Syndication (Windows.Web) (Windows.We b) Data.XML Audio effects.

Vaughan Knight
App Ecosystem Lead
Microsoft
Graphics
enhancements
D2D/DWrite
FileOpenPicke
FileOpenPicker,
r,
FileSavePicker
FileSavePicker
Read/Write
access to SD
card
Appointments/
Appointments
Calendar API
/Calendar
API
enhancements
Appointments/
Appointments
Calendar
/Calendar
brokered UI
Data Sense 2
AtomPub,
AtomPub,
Http, Http,
Syndication
(Windows.Web)
(Windows.We
b)
Data.XML
Audio effects
Trigger
Notes
System Trigger
Runs on a specified system event.
Events: UserPresent/Away, NetworkStateChange, InternetAvailable,
SessionConnected, ServicingComplete, TimeZoneChange
Note: LockScreenApplicationAdded and LockScreenApplicationRemoved are
not supported on Windows Phone
TimeTrigger
Runs on a frequency (minimum gap of 30 minutes)
LocationTrigger
Runs as user enters/leaves a geofenced location
MaintenanceTrigger
Runs on a frequency (minimum gap of 30 minutes)
but only when the device is on AC power
PushNotificationTrigger
Runs in response to an incoming raw push notification sent to the app.
Trigger
Notes
RfcommConnectionTrigger
Bluetooth: when an RFCOMM connection has been established.
DeviceChangeTrigger
Bluetooth: when an ACL connection has been created/destroyed.
BluetoothSignalStrengthTrigger
Bluetooth: when signal strength goes outside of bounds.
GattCharacteristicNotificationTrigger
Bluetooth: when a characteristic change is received from a Bluetooth LE
device
“run this task every 30 minutes if the internet is available”
Geofencing
WinRT API
Geolocation
WinRT API
Geocoordinate
.NET API
Location service
Geofences
Geofence
Core
Core logic
Microsoft
Positioning
Services
Geofence
software
tracking
GNSS
WiFi
Cell
App A
Credential
Locker
App B
MSA
void SaveCredential(string username, string password)
{
PasswordVault vault = new PasswordVault();
PasswordCredential cred = new PasswordCredential("MyAppResource", username, password);
vault.Add(cred);
}
IReadOnlyList<PasswordCredential> RetrieveCredential(string resource)
{
PasswordVault vault = new PasswordVault();
return vault.FindAllByResource(resource);
}
7. Data access
6. Authorization token (Redirect URL)
1. Authorization Request (Start URL)
User
Online
service
7. Data
access
WinRT
Web auth broker
6. Authorization token (Redirect URL)
Windows Phone 8.1 app
User
Dialog
1. Authorization request (Start URL)
Online
service
Windows
// Authenticate using WAB
async void Authenticate()
{
WebAuthenticationResult result =
await WebAuthenticationBroker.AuthenticateAsync(
WebAuthenticationOptions.None, startUri, endUri);
if (WebAuthenticationResult.ResponseStatus ==
WebAuthenticationStatus.Success)
{
// Parse the returned data to get the token out
// token is used in requests to online service
GetToken(WebAuthenticationResult.ResponseData);
}
else
{
// handle failures (user cancel, HTTP error)
}
}
Windows Phone
//Initiate authentication using WAB
void Authenticate()
{
WebAuthenticationBroker.AuthenticateAndContinue(
startUri, endUri);
}
{
// Code runs on reactivation to handle response from WAB
}
protected override async void OnActivated(IActivatedEventArgs args)
{
if (args is WebAuthenticationBrokerContinuationEventArgs)
{
Frame rootFrame = Window.Current.Content as Frame;
// Do standard logic to create the Frame if necessary and restore state
if (rootFrame == null)
{
rootFrame = new Frame();
SuspensionManager.RegisterFrame(rootFrame, "AppFrame");
if (args.PreviousExecutionState == ApplicationExecutionState.Terminated)
{
try { await SuspensionManager.RestoreAsync(); }
catch (SuspensionManagerException) { }
}
// Place the frame in the current Window.
Window.Current.Content = rootFrame;
}
...
...
if (rootFrame.Content == null)
{
if (!rootFrame.Navigate(typeof(MyPageThatDoesAuth)))
{
throw new Exception("Failed to create target page");
}
}
// Pass the continuation event args to the target page
var p = rootFrame.Content as MyPageThatDoesAuth;
// ContinuationArgs is a property that we’ve added to MyPageThatDoesAuth
p.ContinuationArgs = (WebAuthenticationBrokerContinuationEventArgs)args;
// Ensure the current window is active
Window.Current.Activate();
}
}
private WebAuthenticationBrokerContinuationEventArgs _continuationArgs = null;
public WebAuthenticationBrokerContinuationEventArgs ContinuationArgs
{
get { return _continuationArgs; }
set {
_continuationArgs = value;
ContinueWebAuthentication(_continuationArgs); }
}
public async void ContinueWebAuthentication(WebAuthenticationBrokerContinuationEventArgs args)
{
WebAuthenticationResult result = args.WebAuthenticationResult;
if (result.ResponseStatus == WebAuthenticationStatus.Success)
{
String outputToken = result.ResponseData.ToString();
await DoSomethingWithTheTokenAsync(outputToken);
}
else { /* handle failures (user cancel, HTTP error) */ }
}
Contoso
Credentials
pre-populated
if any app
previously
authenticated
to this
provider
1
2
3
Graphics
enhancements
D2D/DWrite
FileOpenPicke
FileOpenPicker,
r,
FileSavePicker
FileSavePicker
Read/Write
access to SD
card
Appointments/
Appointments
Calendar API
/Calendar
API
enhancements
Appointments/
Appointments
Calendar
/Calendar
brokered UI
Data Sense 2
AtomPub,
AtomPub,
Http, Http,
Syndication
(Windows.Web)
(Windows.We
b)
Data.XML
Audio effects