Hi,
In Android (i repeat, only in Android) i’ve problems for login to google games and redirect to leaderboards.
This is my code:
void EventHandler::onTouchLeaderboardIcon()
{
if(sdkbox::PluginSdkboxPlay::isSignedIn() == true)
sdkbox::PluginSdkboxPlay::showAllLeaderboards();
else
sdkbox::PluginSdkboxPlay::signin();
}
void PlayHandler::onConnectionStatusChanged(int status)
{
if(status == sdkbox::GPS_CONNECTED)
sdkbox::PluginSdkboxPlay::showAllLeaderboards();
}
In iOS it works perfect: if i’m not logged in to gamecenter, i log in and i’m redirected to leaderboards.
In Android, i debugged it, and when i call sdkbox::PluginSdkboxPlay::signin()
, onConnectionStatusChanged
is called but the status code is 1001 (GPS_DISCONNECTED
) and i never view a login screen for log in.
I logged out from google games deleting my account in Settings > Accounts.
I’m using Android 6, with the last sdkbox.
It’s a bug? @yinjimmy
htlxyz
October 8, 2018, 1:37am
#2
plz check adb logcat with tag SdkboxGPGAuthentication
I didn’t find that tag.
But I read this msg in logcat when I try to open the leaderboards:
I/SdkboxPlay: Request connect and was already connected.
htlxyz
October 8, 2018, 3:14am
#4
we need sigin success first.
you got GPS_DISCONNECTED
, have you invoke signout
?
No.
I deleted my account in Settings > Account but inside the game i never calls signout
.
htlxyz
October 8, 2018, 3:31am
#8
deleted account in Setting -> Account
lanuch app
sigin
google account login activity show
login success
i can login success.
take a look at this sample.
It’s very weird, because onConnectionStatusChanged
is called and the status is GPS_DISCONNECTED
but i never called sdkbox::PluginSdkboxPlay::signout()
Did you test it on Android 6? The device that i’m using for test is Android 6 API 23.
htlxyz
October 8, 2018, 3:39am
#10
i tested it with Android 5.1.
i have no Android 6 device now.
Any other possibility that may be the cause?
htlxyz
October 8, 2018, 3:45am
#12
cause 1: signout
invoked
cause 2: your activity’s onStop
trigger
I didn’t understand. How would it be?
htlxyz
October 9, 2018, 2:02am
#14
let me show a sample source code:
public class AppActivity extends com.sdkbox.plugin.SDKBoxActivity {
@Override
protected void onStop() {
super.onStop();
}
}
Hi,
I am facing the same issue. when the game goes to background Connection Status Changed to 1001. is this is a bug in sdkbox or did I miss anything?
Pls help me
I’m using Android 9, with the latest sdkboxplay.
Welcome to the club
From my point of view, it’s a sdkbox bug.
I’m not doing anything wrong in my code.
@htlxyz maybe your team should test all cases that sdkbox changes the status to 1001. maybe something are wrong.
Let me check it with Android 6 today.
I check this issue today.
works with https://github.com/sdkbox/sdkbox-sample-cpp317/tree/sdkboxplay on Nexus 6P 6.0.1.
would you check with check list
I tested your app.
Redmi Note 2, Android 5.0.1, Google Play 12.1.18
case 1
no account
click Leaderboards
nothing happen
case 2
sign-in a account
click Leaderboards
welcome UI shows
no Leaderboards UI
restart app
click Leaderboards
Leaderboards UI shows.
Nexus 6P, Android 8.0.0, Google Play 11.9.14
case 1
no account
click Leaderboards
nothing happen
case 2
sign-in a account
click Leaderboards
welcome UI shows
no Leaderboards UI
restart app
click Leaderboards
Leaderboards UI shows.
Nexus 6P, Android 8.0.0, Google Play 12.1.18
case 1
no account
click Leaderboards
nothing happen
case 2
sign-in a account
click Leaderboards
welcome UI shows
no Leaderboards UI
restart app
click Leaderboards
Leaderboards UI shows.
But I test our sdkboxcpp317 sample.
it can show account picker UI on Android 8, but not show on Android 6.
sign-in success both on Android 8 & 6.
Let me do some researching.
What’s your cocos2d-x version?
do you use eclipse or android studio ?
I need more info about your project.