0
我正在使用以下令牌來使用靜默簽名方法獲取Google令牌。我工作正常與調試apk,但它從未適用於簽名的apk。爲什麼?無法在已簽名的apk上獲取GoogleAuthToken
public String getGoogleToken() {
String idToken = null;
String SERVER_CLIENT_ID = "xxxxxxxxxx-xxxxxxxxxxxxxxxxx.apps.googleusercontent.com";
String magicString = "audience:server:client_id:" + SERVER_CLIENT_ID;
try {
idToken = GoogleAuthUtil.getToken(this, Util.getUserEmail(this), magicString);
} catch (IOException e) {
e.printStackTrace();
} catch (GoogleAuthException e) {
e.printStackTrace();
}
return idToken;
}