When Google Game Services has an issue with the connection, this piece of code is run
I don't know how to grab the listener so that I can use onActivityResult (which then allows the code to continue the resolution process), since the startResolutionForResult takes an Activity for its argument( and not a listener that I can register from my Wrapper)
Am I able to do this?
B4X:
/**
* Attempts to resolve a connection failure. This will usually involve
* starting a UI flow that lets the user give the appropriate consents
* necessary for sign-in to work.
*/
void resolveConnectionResult() {
// Try to resolve the problem
debugLog("resolveConnectionResult: trying to resolve result: " + mConnectionResult);
if (mConnectionResult.hasResolution()) {
// This problem can be fixed. So let's try to fix it.
debugLog("result has resolution. Starting it.");
try {
// launch appropriate UI flow (which might, for example, be the
// sign-in flow)
mExpectingActivityResult = true;
mConnectionResult.startResolutionForResult(mActivity, RC_RESOLVE);
} catch (SendIntentException e) {
// Try connecting again
debugLog("SendIntentException.");
connectCurrentClient();
}
} else {
// It's not a problem what we can solve, so give up and show an
// error.
debugLog("resolveConnectionResult: result has no resolution. Giving up.");
giveUp();
}
}
I don't know how to grab the listener so that I can use onActivityResult (which then allows the code to continue the resolution process), since the startResolutionForResult takes an Activity for its argument( and not a listener that I can register from my Wrapper)
Am I able to do this?