Presentation is loading. Please wait.

Presentation is loading. Please wait.

Vaughan Knight App Ecosystem Lead Microsoft FileOpenPicke r, FileSavePicker Read/Write access to SD card Appointments /Calendar API enhancements Appointments.

Similar presentations


Presentation on theme: "Vaughan Knight App Ecosystem Lead Microsoft FileOpenPicke r, FileSavePicker Read/Write access to SD card Appointments /Calendar API enhancements Appointments."— Presentation transcript:

1

2 Vaughan Knight App Ecosystem Lead Microsoft

3

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

5

6 TriggerNotes 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.

7 TriggerNotes 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

8 “run this task every 30 minutes if the internet is available”

9

10

11

12

13

14

15

16

17 Location service Core logic CellWiFiGNSS Geofence Core Geofencing WinRT API Geofences Microsoft Positioning Services Geocoordinate.NET API Geofence software tracking Geolocation WinRT API

18

19

20

21

22

23

24

25

26

27

28

29

30

31 App A Credential Locker App B

32 MSA

33 void SaveCredential(string username, string password) { PasswordVault vault = new PasswordVault(); PasswordCredential cred = new PasswordCredential("MyAppResource", username, password); vault.Add(cred); } IReadOnlyList RetrieveCredential(string resource) { PasswordVault vault = new PasswordVault(); return vault.FindAllByResource(resource); }

34

35 Online service 1. Authorization Request (Start URL) 2. Login page 3. Credentials 4. Authorization page 5. User decision 6. Authorization token (Redirect URL) 7. Data access User

36

37

38 Web auth broker Online service 1. Authorization request (Start URL) 2. Login page 3. Credentials 4. Authorization page 5. User decision 6. Authorization token (Redirect URL) WinRT Dialog User Windows Phone 8.1 app 7. Data access

39 // 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 //Initiate authentication using WAB void Authenticate() { WebAuthenticationBroker.AuthenticateAndContinue( startUri, endUri); } Windows Phone { // Code runs on reactivation to handle response from WAB }

40 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; }...

41 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(); }

42 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) */ } }

43 Contoso Authenticate Authorize app 1 2 3 Consent Credentials pre-populated if any app previously authenticated to this provider

44

45

46

47

48

49

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

51


Download ppt "Vaughan Knight App Ecosystem Lead Microsoft FileOpenPicke r, FileSavePicker Read/Write access to SD card Appointments /Calendar API enhancements Appointments."

Similar presentations


Ads by Google