App to App Communication in Windows Phone 8 - VTC 2014
- 1. App to App Communication in Windows
Phone 8
Senthil Kumar
Microsoft MVP – Client Development
MobileOSGeek.com
- 2. About Me
• Work at Trivium eSolutions , Bangalore
• Microsoft MVP – Client Development
• Speaker , Blogger , Software Engineer.
• BDOTNETTER( Bangalore .NET User Group )
• Windows Phone enthusiast
Blog : MobileOSGeek.com
Twitter : @isenthil
- 3. Agenda
• What is App to App Communication ?
• Introduction to File and Protocol Association
• Auto Launching with File Extension Association
• Auto Launching with Protocol Association
• Launching the Built-in Apps
• Demo
- 4. What is App to App Communication ?
• Enables your application to communicate with another
application.
• Enhance the user experience and easy solutions to apps
providing services outside the app boundaries.
• App to App Communication via
– File Type Associations
– Protocol Associations
- 6. Auto-Launching with File Extension Association
• Allows to automatically launch the app when users tries to
open a file of specified type.
• File Sources can be
– Email attachment
– Link on a Website
– Phone Browser
– NFC Tag
– Another App.
- 7. User Experience with File and Protocol Associations
• On File or protocol launch request
– If there is only one app having corresponding file or protocol
registration , the app will be launched automatically.
– If multiple apps are installed with registered file association , ths user
is provided the choice on which app to launch
– If no apps is registered to handle the file or protocol , the user is
offered the option of downloading one.
- 11. Auto-Launching with File Extension Association
• Registering a File Association
• Receiving a File Launch Request
– Detect a File Launch
– Retrieving a Launched File
• Launching a File
- 12. Adding File Association to WMAppManifest.xml
• Add a FileTypeAssociation element inside Extensions element.
– Extensions element should follow immediately after Tokens element.
- 13. Registering for File Association (Logos)
Logo Size Use Domensions
Small Email attachments 33X33 pixels
Medium Office Hub list view 69X69 pixels
Large Browser download 176X176 pixels
- 14. File Launch Request
• On App Launch from the File Launch , a deep link URI is sent to
the app
/FileTypeAssociation?fileToken=37dfc6ed-cdba-4424-9fa2-dba990a07486
• URI Mapper for Parsing deep link URI and mapping to the page
in the App.
- 18. Protocol Associations
• Allows your app to automatically launch when another app
launches a special URI
• The URI begins with a protocol name that your app has
registered for
– For example , mobileosgeek is the protocol name in the below URI
– Mobileosgeek:ShowProducts?CategoryID=87411445-5451-419d-
a2eb-79b39c8c552c
- 19. Auto-Launching with Protocol Association
• Registering for Protocol Association
• Receiving Protocol Launch Request
– Detecting a Protocol Launch
• Launching a Protocol URI
• Reserved Protocol Names
- 20. Registering for Protocol Association in
WMAppManifest.xml
• To register for protocol association , add a Protocol element
inside Extensions element.
– The Extensions element must follow immediately after the Tokens
element.
- 22. Reserved Protocol Names
• Protocol Names reserved for Build-in Apps
– http , Tel , Onenote etc
• Protocol Names reserved for Operating System
– File , telnet etc.
- 23. Launching Built-In Apps
• Launch some of the built-in apps using Uri schemes.
• Use Launcher.LaunchUriAsync method to launch the apps.
Eg : To launch the wifi settings app.
- 25. Resources
Building Apps for Windows Phone 8 Jump Start
http://channel9.msdn.com/Series/Building-Apps-for-Windows-
Phone-8-Jump-Start
Matt Lacey's article on 325 Windows Phone apps you can launch
from your own app
http://blog.mrlacey.co.uk/2014/03/325-windows-phone-apps-you-
can-launch.html
Windows Phone 8 Training Kit
http://www.microsoft.com/en-in/download/details.aspx?id=38782