Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints (small.

Download Report

Transcript Reaching your customers in new and unique ways Mobile “Devices” led to revolutionary Experiences “Bring the experience with you” Came with many constraints (small.

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.)
The Experience you want on the device you want
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.
User
Enabling Mobile Experiences with Universal
Apps
Create shared mobile experiences
whatever the device
7
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;
8
Windows.Storage.ApplicationDataContainer roamingSettings =
Windows.Storage.ApplicationData.Current.RoamingSettings;
if (roamingSettings.Values.ContainsKey("userName"))
{
name.Text = roamingSettings.Values["userName"].ToString();
}
Windows.Storage.ApplicationData.Current.DataChanged += Current_DataChanged;
...
void Current_DataChanged(ApplicationData sender, object args)
{
// Refresh your settings...
}
You should still load up all your data when your app starts
Do not use Roaming Data as a general
purpose data syncing mechanism
MSA
AAD
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);
}
More information: //BUILD/ session 3-734
New OneDrive APIs for Developing Against OneDrive AND OneDrive for Business
http://channel9.msdn.com/Events/Build/2015/3-734
Use a common Gateway to authenticate
The best mobile apps handle network
interruptions gracefully
Adding offline sync to an app is usually
hard.
With Azure Mobile App, it’s easy.
Client
Conflict
resolution
Server
Conflict
resolution
Server
Device 1
▲, 1
Create
▲, 1
▲, 1
▲, 1
▲, 1
●,
▲, 21
■,
▲, 2
1
Update
Device 2
✘
■, 2
Fetch
Update
▲, 1
▲,
■, 1
2
■, 2
1
4
Client app
3.
Your backend connects to PNS and requests push
Your code has to manage scale
Your code has to map between logical users and device handles
2
3
5
App back-end
5.
6.
Your code must delete expired handles when PNS rejects
them
Your code must map between logical users and device
handles
Platform
Notification
Service
6
registers with Notification Hub using tags to
represent logical users and groups
1
4
Client app
4.
Notification Hub manages scale
Notification Hub maps logical users/groups to device handles
Notification Hub delivers notifications to matching devices
PNS
4
2
2
5.
6.
Notification Hub deletes expired handles when PNS rejects
Notification Hub maintains mapping between logical
users/groups and device handles
App back-end
5
6
3
Notification
Hub
aka.ms/TryMobileApp
aka.ms/AppServiceMobile