createRandomChallenge - matchID not used

In the function

coronaCloudController.createRandomChallenge(matchID, matchType, userAlert)

the matchID is never used.

Why is that ?

I’m not 100% sure why that parameter is there.  The way random matches work is you ask to join a random match and you get put into a queue that waits until someone else has requested a random match.  When there are two people wanting random matches, a match is created and both players added to that at which point you will see the match in your match list.  The userAlert is the message the player sees via Push when the match is ready.

thank you for all your answers, hard to program without documentation.

How to cancel the createRandomChallenge ?

Lets say I start the createRandomChallenge (have a “Find opponent” button), but there is no user to pair with.

The player leaves my Online screen. At that moment I would like to cancel his random challenge (remove him from the queue of players waiting for random match).

When I hit the “Find opponent” after the return, get the message “you have already requested for a matchup”.

Seems there is no way of doing that and I think this is a essential feature.

Why ?

If I left the game (or Online screen) and I am still in the queue,  when another player request a random opponent it could be me (and in my testing with 2 players it always is me).

But I left the Online screen and I am no more interested in the game.

I don’t know of a way to cancel it and you can only have one active at a time.  Once you are paired up you will get a push notification.  I’ll ping the Cloud team so they can add some context to why this how it works.

So once you call createRandomChallenge you are in the queue forever ?

Oh no, again not a solution I need.

Will try to find a solution with createMatch…

I’m not 100% sure why that parameter is there.  The way random matches work is you ask to join a random match and you get put into a queue that waits until someone else has requested a random match.  When there are two people wanting random matches, a match is created and both players added to that at which point you will see the match in your match list.  The userAlert is the message the player sees via Push when the match is ready.

thank you for all your answers, hard to program without documentation.

How to cancel the createRandomChallenge ?

Lets say I start the createRandomChallenge (have a “Find opponent” button), but there is no user to pair with.

The player leaves my Online screen. At that moment I would like to cancel his random challenge (remove him from the queue of players waiting for random match).

When I hit the “Find opponent” after the return, get the message “you have already requested for a matchup”.

Seems there is no way of doing that and I think this is a essential feature.

Why ?

If I left the game (or Online screen) and I am still in the queue,  when another player request a random opponent it could be me (and in my testing with 2 players it always is me).

But I left the Online screen and I am no more interested in the game.

I don’t know of a way to cancel it and you can only have one active at a time.  Once you are paired up you will get a push notification.  I’ll ping the Cloud team so they can add some context to why this how it works.

So once you call createRandomChallenge you are in the queue forever ?

Oh no, again not a solution I need.

Will try to find a solution with createMatch…