O'Reilly logo

Windows® Phone 8 Unleashed by Daniel Vaughan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required