Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences...
-
Upload
kathleen-beasley -
Category
Documents
-
view
214 -
download
0
Transcript of Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences...
![Page 1: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/1.jpg)
Cloud IntegrationDeveloper’s Guide to Windows 10
![Page 2: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/2.jpg)
AgendaConnected Mobile ExperiencesRoaming DataSharing State using OneDriveAzure Mobile AppsCreating an Azure Mobile Apps ServiceOffline syncPush Notifications
![Page 3: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/3.jpg)
Evolution of Mobile Experiences
Reaching your customers in new and unique ways
Mobile “Devices” led to revolutionary Experiences
“Bring the experience with you”
Came with many constraints (small screen, battery, etc.)
![Page 4: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/4.jpg)
Mobile Experiences - not just mobile devices
User is the center of the experience, not the device.
Available on the right device at the right time
Input model optimized for the experience.
Enabling Mobile Experiences with Universal Apps
The Experience you want on the device you want
User
![Page 5: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/5.jpg)
Create shared mobile experiences whatever the device
![Page 6: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/6.jpg)
Roaming Data APIs
![Page 7: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/7.jpg)
Using the Roaming settingsThe RoamingSettings are exposed as a dictionary into which an application can save data
Note: On Windows Desktop, there is a special HighPriority key. This has no effect on Windows Mobile.
Windows.Storage.ApplicationDataContainer roamingSettings = Windows.Storage.ApplicationData.Current.RoamingSettings;
roamingSettings.Values["userName"] = name.Text;
var composite = new Windows.Storage.ApplicationDataCompositeValue(); composite["intVal"] = 1; composite["strVal"] = "string"; roamingSettings.Values["exampleCompositeSetting"] = composite;
![Page 8: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/8.jpg)
Reading the Roaming settingsQuery the roaming settings by using the key nameWindows.Storage.ApplicationDataContainer roamingSettings = Windows.Storage.ApplicationData.Current.RoamingSettings;
if (roamingSettings.Values.ContainsKey("userName")){ name.Text = roamingSettings.Values["userName"].ToString();}
![Page 9: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/9.jpg)
Roaming FolderUse the roaming app data store to read/write files and folders
![Page 10: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/10.jpg)
DataChanged notificationThe DataChanged event fires when the roaming data has changed
Windows.Storage.ApplicationData.Current.DataChanged += Current_DataChanged;...
void Current_DataChanged(ApplicationData sender, object args){ // Refresh your settings...}
The event only fires if the application is active You should still load up all your data when your app starts
![Page 11: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/11.jpg)
Debugging apps using Roaming DataDevelopers can install an application on multiple unlocked devicesLocking a developer device will trigger the synchronisation If you have problems:Make sure that files are closed correctlyMake sure that the devices are running the same version of the application
![Page 12: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/12.jpg)
Demo: Roaming Data
![Page 13: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/13.jpg)
Tips on using roaming dataUse roaming folder and roaming settings in the same way as local folder and settingsHighPriority setting is available on Windows Desktop for quick sync, but has no effect on Windows Mobile
Good for app customisation settings, most recent activity, partially completed workSynchronisation stops if roaming data > 100KBBad for synchronising large amounts of data or “instant syncing” scenariosLast writer winsData deleted from cloud if app not used for “a period of time” (~30 days)
![Page 14: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/14.jpg)
Do not use Roaming Data as a general purpose data syncing mechanism
![Page 15: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/15.jpg)
Credential Lockersecurely store and roam user credentials
![Page 16: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/16.jpg)
OverviewAPIs to store credentials (user name, password) securelyWindows.Security.Credentials
Benefits:Secure storageCredential isolationRoaming
![Page 17: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/17.jpg)
RoamingCredentials roam across trusted devicesUses public or business cloud according to primary user identity
MSA
App
AAD
App
![Page 18: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/18.jpg)
Credential Locker sample
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);}
![Page 19: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/19.jpg)
Sharing State using OneDrive
![Page 20: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/20.jpg)
OneDrive Cloud StorageOneDriveAccessible cloud storage for personal documents, photos, and files that can be accessed from anywhere.Best for user owned content.
OneDrive for BusinessSecure enterprise grade storage for business documents and files.Best for business / enterprise owned content.
Depending on your app targeting both is appropriate.
![Page 21: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/21.jpg)
OneDrive Integration choices
Pickers and savers for quick integrations.Quickly open files from OneDrive and save files back.Supported for JavaScript, iOS, Android, and Windows Universal apps.
Two pathways to light up OneDrive<->app integration
More information: //BUILD/ session 3-734New OneDrive APIs for Developing Against OneDrive AND OneDrive for Business
http://channel9.msdn.com/Events/Build/2015/3-734
OneDrive API for deeper / robust integrations.Rich web API that enables all integrations with OneDrive.First party applications built on this.
![Page 22: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/22.jpg)
Demo: OneDrive File Access
![Page 23: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/23.jpg)
Azure App ServiceMobile Apps
![Page 24: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/24.jpg)
App Service: one integrated offering
API AppsEasily build and
consume APIs in the cloud
Web AppsWeb apps that scale with your business
Mobile AppsBuild Mobile apps
for any device
LOGIC AppsAutomate business
process across SaaS and on-premises
![Page 25: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/25.jpg)
App Service Platform View (Runtime)
API Apps
Web Apps
Mobile Apps
LOGIC Apps
![Page 26: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/26.jpg)
App ServiceCreate web and mobile experiences that share data access and business logicAutomate business processes with logic appsBuild custom APIs or consume connectors from MarketplaceOne common billing model for all of your App Services
Use a common Gateway to authenticate
![Page 27: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/27.jpg)
Demo:Creating an Azure Mobile App
![Page 28: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/28.jpg)
Mobile Apps Dynamic Schema
Very easy to configure backend data tables!
Create new table in backend store
Post Json from clientTable auto-configured with columns, plus sync tracking columns
![Page 29: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/29.jpg)
Azure MobileOffline data sync
![Page 30: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/30.jpg)
The best mobile apps handle network interruptions gracefully
![Page 31: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/31.jpg)
Adding offline sync to an app is usually hard.
With Azure Mobile App, it’s easy.
![Page 32: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/32.jpg)
Why use mobile offline sync?Improve app responsiveness by caching server data locally on the deviceMake apps resilient against intermittent network connectivity Allow end-users to create and modify data even when there is no network accessSync data across multiple devices Detect and handle conflicts when the same record is modified by more than one client
![Page 33: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/33.jpg)
How it worksAccess data from Mobile Services tables even when app is offlineKeep a local queue of Create, Update, Delete operations and synchronize with server when app is back onlineDetect conflicts when same item is changed both locally and on serverUse soft delete to remove deleted records from client data storesCan use push notifications to trigger client sync
![Page 34: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/34.jpg)
Demo:Azure Mobile App Offline Sync
![Page 35: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/35.jpg)
Handle client sync conflicts
ClientConflict resolution
ServerConflict resolution
![Page 36: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/36.jpg)
▲, 1■, 2
▲, 1
▲, 1
●, 2
■, 2
Detect Conflicts with Optimistic Concurrency
Device 1Server
Device 2
▲, 1 ▲, 1
▲, 1 ▲, 1
▲, 1
■, 2
▲, 1
Create
Fetch
Update
Update
■, 2 ✘
![Page 37: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/37.jpg)
Summary: Azure Mobile offline syncSupports both “primarily online” and “occasionally connected” scenariosExplicit push and pull leaves control to the developer
Works with a variety of server data storesSQL, Azure Tables, Mongo, Dynamics CRM, Salesforce, etc.
Cross-platform client SDKsWindows Universal, Xamarin, iOS, Android
Flexible and powerfulSupports custom local storage layersDetect and handle conflicts on server or client
![Page 38: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/38.jpg)
Adding push notifications
![Page 39: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/39.jpg)
Push Notifications 101Register device handle at app launch1. Client app retrieves handle from Platform Notification
Service (PNS)2. Client app sends handle to your custom backend
Send Notification3. Your backend connects to PNS and requests push
Your code has to manage scaleYour code has to map between logical users and device handles
4. PNS pushes notification to device
Maintain backend device handles5. Your code must delete expired handles when PNS
rejects them6. Your code must map between logical users and
device handles
PlatformNotification
Service
App back-end
Client app
1
23
4
5
6
![Page 40: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/40.jpg)
Azure Notification HubsRegister device handle at app launch1. Client app retrieves handle from Platform Notification
Service2. Client sends handle to your backend
Backend registers with Notification Hub using tags to represent logical users and groups
Send Notification3. Backend sends request to Notification Hub using a tag
Notification Hub manages scaleNotification Hub maps logical users/groups to device handles
4. Notification Hub delivers notifications to matching devices
Maintain backend device handles5. Notification Hub deletes expired handles when PNS
rejects6. Notification Hub maintains mapping between logical
users/groups and device handles
PNS
App back-end
Client app
1
2
2
4
5
6
NotificationHub
3
4
![Page 41: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/41.jpg)
Demo: Push Notifications
![Page 42: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/42.jpg)
Try it nowTry Azure Mobile App for free!No credit card required!Go to aka.ms/TryMobileApp
Learn moreGo to aka.ms/AppServiceMobile
Tweet @azuremobile
![Page 43: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/43.jpg)
ReviewConnected Mobile ExperiencesRoaming DataSharing State using OneDriveAzure Mobile AppsCreating an Azure Mobile Apps ServiceOffline syncPush Notifications
![Page 44: Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints.](https://reader035.fdocuments.in/reader035/viewer/2022062517/56649e875503460f94b8a42f/html5/thumbnails/44.jpg)
© 2015 Microsoft Corporation. All rights reserved.