Currently, im trying to run tbmp skeleton sample and my set up is a physical 4.2.2 android device and a 4.3 genymotion emulator.
Everything is working on both sides, except that my physical device isnt displaying the Toast notification when i take a turn in the emulator or when i send invitation.
The emulator is displaying everything just fine, but for some reason, this 2 methods just dont get called in the physical device.
The Code:
public class SkeletonActivity extends BaseGameActivity implements OnInvitationReceivedListener, OnTurnBasedMatchUpdateReceivedListener {
@Override
public void onSignInSucceeded() {
...
Games.Invitations.registerInvitationListener(getApiClient(), this);
Games.TurnBasedMultiplayer.registerMatchUpdateListener(getApiClient(), this);
}
@Override
public void onInvitationReceived(Invitation invitation) {
Toast.makeText(
this,
"An invitation has arrived from "
+ invitation.getInviter().getDisplayName(), TOAST_DELAY)
.show();
}
@Override
public void onTurnBasedMatchReceived(TurnBasedMatch match) {
Toast.makeText(this, "A match was updated.", TOAST_DELAY).show();
}
Is there anything i might be missing? Maybe some option to allow my device to external "pushes"? I've searched everywhere and havent found anything.
Thanks in advance.
EDIT: ive found that the problem is behond that..While the emulator gets notified when its turn starts even if the app isnt on through play games, my physical device doesnt.. Im using Xperia L 4.2.2.. Thanks again.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…