有沒有實施Google登錄的方法,不需要Google Play服務?我知道,官方文檔說,你需要GPS:Android:谷歌登錄沒有Google Play服務的用戶?
•https://developers.google.com/identity/sign-in/android/start-integrating
但是我也發現這裏相互矛盾的信息:
•Google Plus Login without Google Play Services
,指出在使用Google+ API,您可以在用戶沒有GPS的情況下實現登錄。這是真的嗎?您是否可以在技術上實現不使用GPS的登錄?如果可以的話,對於無論何種原因都無法下載GPS的用戶來說,這將是一件好事。
非常感謝您的回覆!關於您引用的第一個文檔的問題。它規定:「要開始使用GoogleAuthUtil訪問Google的REST API,您必須使用Google Play服務庫設置您的Android應用項目。」這是否意味着這要求用戶應該在他們的設備上安裝GPS才能使其工作?它也會拋出一個GooglePlayServicesAvailabilityException,這似乎證實了這一點。 – Jon
你是對的,對不起!在帳戶管理器中的這種方法應該給你一個有效的認證令牌http://developer.android.com/reference/android/accounts/AccountManager.html#getAuthToken(android.accounts.Account,%20java.lang.String,%20android .os.Bundle,%20android.app.Activity,%20android.accounts.AccountManagerCallback,%20android.os.Handler),但我不知道如何交換訪問令牌(如果你需要) –