0
我正在将Google日历集成到我的Android应用中。用户需要授权才能访问事件信息。我使用GoogleAuthorizationRequestUrl来构建授权请求URL。的代码如下(在片断下面我替换字符串CLIENT_ID原始客户端ID):GoogleAuthorizationRequestUrl构建错误的请求网址
String url = new GoogleAuthorizationRequestUrl(CLIENT_ID,
"http://localhost",
"https://www.googleapis.com/auth/calendar.readonly").build();
其中GoogleAuthorizationRequestUrl建立的URL为:
代替
换句话说,我希望有“scope = https://www.googleapis.com/auth/c alendar.readonly“,但我有”b = https://www.googleapis.com/auth/calendar.readonly“。
奇怪的是,只有当我准备发布APK时,我才会收到错误的请求URL。在我的调试环境GoogleAuthorizationRequestUrl中构建一个正确的URL。
有没有人有这种行为的想法?
感谢, -Ali