app-to-app communication

11
APP-TO-APP COMMUNICATION Prepared by ENG SOON CHEAH Microsoft MVP

Upload: cheah-eng-soon

Post on 08-Jan-2017

368 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: App-to-App communication

APP-TO-APP COMMUNICATIONPrepared by

ENG SOON CHEAH

Microsoft MVP

Page 2: App-to-App communication

Custom URI Associations

– Play an album on Spotify

– Play a video in YouTube

– Post an update to Facebook

– Launch device settings

– Browser

– Messaging

– EmailLauncher.LaunchUriAsync(new Uri("myapp:foo=1&bar=2"));

Page 3: App-to-App communication

Useful Built-in URI AssociationsTask URI Scheme

Lock screen settings ms-settings-lock:

Email and accounts ms-settings-emailandaccounts:

Location settings ms-settings-location:

Search for apps by publisher zune:search?publisher=<publisherID>

Page 4: App-to-App communication

File Type Associations

– Microsoft Office

– Adobe Reader

– Browser

– Email

– Office Hub

var pdfFile =await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appdata:///Local/mydoc.pdf"));

Launcher.LaunchFileAsync(pdfFile);

Page 5: App-to-App communication

Using URI Associations to Extend Your App

Spotify

YouTube

Page 6: App-to-App communication

Using URI Associations to Extend Your App Facebook

Foursquare

Page 7: App-to-App communication

Using URI Associations to Extend Your App Here Drive (+others)

Here Maps (+others)

Page 8: App-to-App communication

Demo Code (whatapp)

try

{

await Windows.System.Launcher.LaunchUriAsync(new Uri(“whatsapp:"));

}

catch

{

MessageDialog dialog = new MessageDialog(" please install whatsapp from the app store ", " AppMissing ");

await dialog.ShowAsync();

}

11/17/2015

Page 9: App-to-App communication

Send message via whatsapp

"whatsapp://send?text=Hello%2C%20World!"

11/17/2015

Page 10: App-to-App communication

Launch Skype from your apps

Skype supports the following protocols

■ skype

■ tel

■ sms

■ message-skype-com

■ message-messenger

■ audiocall-messenger

■ videocall-messenger

■ audiocall-skype-com

■ videocall-skype-com

11/17/2015

Page 11: App-to-App communication

Demo (Skype)

var chatTo = new Uri("message-skype-com:" + UserNameTextBox.Text);

await Windows.System.Launcher.LaunchUriAsync(chatTo);

11/17/2015