MSN Messenger Activity API Scott Swanson COM 301

  • Slides: 25
Download presentation
MSN Messenger Activity API Scott Swanson COM 301 Group Product Planner Microsoft Corporation 1

MSN Messenger Activity API Scott Swanson COM 301 Group Product Planner Microsoft Corporation 1

Agenda What are MSN Messenger Activities? Activity Application Demo Creating an Activity Application Provisioning/Deploying

Agenda What are MSN Messenger Activities? Activity Application Demo Creating an Activity Application Provisioning/Deploying an Activity Application Debugging an Activity Application Activities Application Building Contest Summary 2

What Are Activity Applications? One or two user applications built on the MSN Messenger

What Are Activity Applications? One or two user applications built on the MSN Messenger communication infrastructure Connect Peer to Peer or through the MSN Cloud Work across firewalls and proxies Run in an IE window attached to the MSN Messenger Conversation window Can be hosted on the Internet or intranet Interact with Messenger conversation stream Messenger user Info Launch from inside or outside MSN Messenger Contact based invitation model Launch ability provisioned by MSN 3

Messenger Activity Platform Applications can be built using DHTML or Active. X Development options

Messenger Activity Platform Applications can be built using DHTML or Active. X Development options ASP. NET, C/C++, C#, Visual Basic®, VBScript, JScript®, HTML, DHTML, XML, and more… Great international support! MSN Messenger Worldwide Support 25+ languages 45+ Markets Can be market and/or language specific 4

MSN Messenger Activity Application Scott Swanson/Carmen Zlateff Group Product Planner/Lead Program Manager MSN Messenger

MSN Messenger Activity Application Scott Swanson/Carmen Zlateff Group Product Planner/Lead Program Manager MSN Messenger 5

Building An Activity Application 6

Building An Activity Application 6

Design Considerations IE 5. 01 or greater required Max window size 500 x 500

Design Considerations IE 5. 01 or greater required Max window size 500 x 500 pixels Connection Types Indirect – via Messenger cloud Data rate 195 k per minute Direct – Peer to Peer Data rate limited by connection bandwidth Security considerations require that Active. X applications be certified by MSN Application should include a Help link No adult, gambling, or hateful content 7

Messenger Activity Objects External – Parent object Channel – Client to client communication Error

Messenger Activity Objects External – Parent object Channel – Client to client communication Error – Error code and data File. Info – File transfer operations Messenger – Shows Options dialogs User – User properties Users Collection – Enumerates user list Access restricted 8

Required Definitions Applications must sync these events function Channel_On. Remote. App. Loaded() { //

Required Definitions Applications must sync these events function Channel_On. Remote. App. Loaded() { // The remote application is loaded and ready; start multiplayer } function Channel_On. Remote. App. Closed() { // Remote application is shutting down; game over } function Channel_On. Data. Received() { // Data received from remote app, inspect value of Channel. Data } function Channel_On. Data. Error() { // Error during Send. Data, may need to retry. } function Channel_On. Type. Changed() { // Inspect Channel. Type for the state of the connection (Direct, Indirect, Disconnected) } function Channel_On. App. Close() { // Messenger is shutting down, clean up application } 9

Let’s Write Code… 10

Let’s Write Code… 10

Provisioning An Activity Application 11

Provisioning An Activity Application 11

What Is Provisioning? Two step process Enable you to test your application Make application

What Is Provisioning? Two step process Enable you to test your application Make application available to MSN Messenger users Why does MSN require provisioning? Verify apps use the Activity API properly Verify app compliance with Terms of Use Give Messenger users a great experience 12

Provisioning Settings Creating the msgrp 2 p. xml file Enables MSN Messenger to load

Provisioning Settings Creating the msgrp 2 p. xml file Enables MSN Messenger to load an unprovisioned application for testing Same XML as used by MSN servers Adds item to the “Actions” menu Start (Name) defined by the Name element Needed on both machines for testing 13

Creating msgrp 2 p. xml Important values to set Entry. ID = ‘ 7’

Creating msgrp 2 p. xml Important values to set Entry. ID = ‘ 7’ for test apps Category = ’ 50’ for test apps Sequence = ’ 10’ for testing Name = String displayed in Actions menu URL = HTTP address of Activity web page Type App=application Dir=game Height Max=500 Width Max=500 14

Provisioning Restricted Functionality Send. IM Exposes Enter. IM & Send. IM methods in the

Provisioning Restricted Functionality Send. IM Exposes Enter. IM & Send. IM methods in the Channel object Receive. IM Exposes On. IMReceived event and IM property (ro) Active. X Load Active. X controls in local user security context Enable. IP Allows access to local & global IP addresses Replace. IM Exposes On. IMReceived event and IM property (rw) Send. File Exposes file xfer PEMs in the Channel object User. Properties Exposes Email and Name in User object 15

Launching An Activity Application Launch from Actions menu Start (Application Name) Works prior to

Launching An Activity Application Launch from Actions menu Start (Application Name) Works prior to MSN provisioning Launching From a Web Page Only works after MSN provisioning Invoke MSN Messenger by calling http: //messenger. msn. com/Resource/games. aspx? app. ID=APPID The APPID value Uniquely represents your Activity application Assigned by MSN during provisioning 16

Creating The msgrp 2 p. xml 17

Creating The msgrp 2 p. xml 17

Debugging Activity Applications 18

Debugging Activity Applications 18

Debugging Setup Enable debugging in IE Advanced Tab Uncheck “Disable script debugging (IE)” Uncheck

Debugging Setup Enable debugging in IE Advanced Tab Uncheck “Disable script debugging (IE)” Uncheck “Disable script debugging (Other)” Place app and resources on web server Multi-user apps require 2 machines to have 2 Messenger logins Edit msgrp 2 p. xml to reference web server Place msgrp 2 p. xml on test machines C: Program FilesMSN Messenger 19

Debugging Tips And Tricks Java. Script: Use the “debugger” keyword to start script debugging

Debugging Tips And Tricks Java. Script: Use the “debugger” keyword to start script debugging Place “debugger” keyword at top of page Enables variables in locals window Enables setting breakpoints Use Channel. Send. IM to output debugging text to conversation window Reopen conversation to reload msgrp 2 p. xml Application is reloaded on every invocation Antispyware apps can change IE settings! 20

Running And Debugging 21

Running And Debugging 21

Worlds Greatest Application Contest http: //activity. msn. com for details Contest runs 9/12 to

Worlds Greatest Application Contest http: //activity. msn. com for details Contest runs 9/12 to 12/31/2005 Entrant apps published twice/week Enter as many apps as you like Great Prizes 3 Alienware PCs, 10 Oakley Thump glasses, 65 copies of Visual Studio 2005 Pro Prizes awarded world-wide Apps must be submitted in English Winners announced Feb 2006 22

Community Resources At the PDC Hands On Lab: COMHOL 34, Daily Ask the Experts

Community Resources At the PDC Hands On Lab: COMHOL 34, Daily Ask the Experts Table: Thurs 9/15, 5: 30 -9: 30 pm MSN Messenger Booth After the PDC Messenger Developer Center http: //msdn. microsoft. com/msn/messenger MSN Messenger forum http: //forums. microsoft. com/msdn/default. aspx? Forum. Group. I D=23 Messenger Activity application contest http: //activity. msn. com 23

Conclusion Focus on the app, not the infrastructure… MSN communications infrastructure simplifies crossing firewalls,

Conclusion Focus on the app, not the infrastructure… MSN communications infrastructure simplifies crossing firewalls, routers, etc… Messenger Activity API is available today Reach 170 million users world-wide Activity applications are ideal for Interactive communication scenarios Games Photos, maps, sports, shopping, financial 24

© 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only.

© 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary. 25