Alright, interesting issue has popped up. I’ve moved to master and am correctly showing the login UI (Well, I think I’m correct using a simple call to onlineSubsystem->GetExternalUIInterface()->ShowLoginUI()) but when I try to grab the user data from gpg::PlayerManager::FetchSelfBlocking(), it results in response with ERROR_NOT_AUTHORIZED as the status. Naturally I assumed this was a permissions issue, but no matter what permissions I add, it still reports ERROR_NOT_AUTHORIZED. From logging in via one of my classes, I call onlineSubsystem->GetIdentityInterface()->GetUserAccount() where the following extremely ugly test code resides:
UE_LOG(LogOnline, Warning, TEXT("XYZ GP - Begin get game services."));
gpg::GameServices* gs = MainSubsystem->GetGameServices();
UE_LOG(LogOnline, Warning, TEXT("XYZ GP - Begin fetch self blocking."));
gpg::PlayerManager::FetchSelfResponse playerFetch = gs->Players().FetchSelfBlocking();
UE_LOG(LogOnline, Warning, TEXT("XYZ GP - Response Status %i."), playerFetch.status);
UE_LOG(LogOnline, Warning, TEXT("XYZ GP - Begin get own player data."));
gpg::Player gsplayer = playerFetch.data;
UE_LOG(LogOnline, Warning, TEXT("XYZ GP - Player valid = %s."), gsplayer.Valid() ? TEXT("true") : TEXT("false"));
FString ID = FString(gsplayer.Id().c_str());
UE_LOG(LogOnline, Warning, TEXT("XYZ GP - Got ID %s."), *ID);
return MakeShareable(new FUserOnlineAccountGooglePlay(ID)); //FUserOnlineAccountGooglePlay is essentially a stipped down clone of FUserOnlineAccountAmazon
I fully realise that this code can be shrunk down to two or three lines.
Now, I’m just wondering if you can provide any insight as to why I would get ERROR_NOT_AUTHORIZED for this, or at the very least some hints as to how the system works or where I’m going wrong. Surprisingly, Google searching for this returned very few errors, and the GPG docs don’t help much with regards to permissions or whatnot.
Edit:
Just like to add that I’m running launching this from the editor. My signing keys are correctly set up (Achievements work correctly at least) and my account is a valid tester for the Google Play Services, although I don’t know how launching from editor differs from packaging for shipping in this case. When I’m next available, I’ll package the game properly and test using that.
In addition, I just noticed that the small banner telling you that you’ve signed in no longer appears in this version.
Edit 2: Electric Boogaloo:
Well I’m a dunce. Just looked through LogCat and found in big red text that the Google Play Game Services API is not enabled for my project (I can confirm it is in my Alpha published version, so the settings are correct), which gives me almost 100% confidence that I just need to package the game and I’ll be golden.
Edit 3
Nope, packaging didn’t help (Although I can’t see any Google Play Service errors in LogCat now, so maybe it did something)