Inviting Game Players with the GameInviteTask
The game invite task is used to show a game invite screen that enables the user to invite players to a multiplayer game session that is in progress on a Windows Phone device. The invitation is sent asynchronously.
Caution
The game invite task works only when called from within a game that is approved for release on Xbox LIVE on Windows Phone.
When the user finishes sending the invite, cancels out of the task, or an error occurs, the task’s Completed
event is raised.
The GameInviteTask
should be defined as a field in your class, like so:
readonly GameInviteTask gameInviteTask = new GameInviteTask();
Subscribe to the GameInviteTask.Completed
event within your class constructor, as shown:
gameInviteTask.Completed ...
Get Windows® Phone 8 Unleashed now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.