app-to-app communication

Post on 08-Jan-2017

368 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

APP-TO-APP COMMUNICATIONPrepared by

ENG SOON CHEAH

Microsoft MVP

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"));

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>

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);

Using URI Associations to Extend Your App

Spotify

YouTube

Using URI Associations to Extend Your App Facebook

Foursquare

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

Here Maps (+others)

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

Send message via whatsapp

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

11/17/2015

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

Demo (Skype)

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

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

11/17/2015

top related