PlayerIO

The fastest way to build online games without breaking a sweat.

Android Client Reference

Android  class documentationClass GameRequests

Namespace: com.playerio
Language: Java

The Player.IO GameRequests service

Methods

 
public void
delete (GameRequest[] requests, Callback<Void> callback)

Delete the given requests. Will also update the Received property after deletion is complete.

public GameRequest[]
getWaitingRequests ()

The list of oldest received requests that are waiting to be processed and deleted.

public void
refresh (Callback<Void> callback)

Refresh the list of received requests. public void refresh() throws PlayerIOError { GameRequestsRefreshOutput output = channel.gameRequestsRefresh(PlayCodes.getInstance().getPlayCodes()); PlayCodes.getInstance().setPlayCodes(output.NewPlayCodes); read(output.Requests, output.MoreRequestsWaiting); } Refresh the list of received requests.

public void
send (String requestType, Map<String,String> requestData, String[] recipients, Callback<Void> callback)

Send a GameRequest to the specified recipients

public void
showSendDialog (Activity activity, String requestType, Map<String,String> requestData, Callback<GameRequestSendDialogResult> callback)

Show a dialog to send GameRequests

GameRequests.delete

public void
delete (GameRequest[] requests, Callback<Void> callback)

Delete the given requests. Will also update the Received property after deletion is complete.

Arguments

GameRequest[] requests
Callback<Void> callback

GameRequests.getWaitingRequests

public GameRequest[]
getWaitingRequests ()

The list of oldest received requests that are waiting to be processed and deleted.

GameRequests.refresh

public void
refresh (Callback<Void> callback)

Refresh the list of received requests. public void refresh() throws PlayerIOError { GameRequestsRefreshOutput output = channel.gameRequestsRefresh(PlayCodes.getInstance().getPlayCodes()); PlayCodes.getInstance().setPlayCodes(output.NewPlayCodes); read(output.Requests, output.MoreRequestsWaiting); } Refresh the list of received requests.

Arguments

Callback<Void> callback

GameRequests.send

public void
send (String requestType, Map<String,String> requestData, String[] recipients, Callback<Void> callback)

Send a GameRequest to the specified recipients

Arguments

String requestType
Map<String,String> requestData
String[] recipients
Callback<Void> callback

GameRequests.showSendDialog

public void
showSendDialog (Activity activity, String requestType, Map<String,String> requestData, Callback<GameRequestSendDialogResult> callback)

Show a dialog to send GameRequests

Arguments

Activity activity
String requestType
Map<String,String> requestData
Callback<GameRequestSendDialogResult> callback