Posts

Showing posts with the label android

cordova-plugin-googleplus 無法在 android 上使用 google sign in

Image
我遇到的問題是 在 Android 手機上點選 Google sign-in 會沒有反應 正常會跳出視窗讓你選擇用哪個帳號登入 我們是使用這個套件  cordova-plugin-googleplus 在 iOS 上都是正常的 原本以為是 UI 被遮到 還特別把他將 Fb 的位置對調 而且奇怪的點是,在 console 沒有看到任何的錯誤訊息 這問題困擾了我好幾天 後來嘗試將 cordova-plugin-googleplus 版本一個一個降版 從 5.2.2 到 5.3.2 中每一個版本都試過 後來才發現 5.2.1 是可以 work 的! 不過遇到了 error 16 感謝 這個討論串 讓我很快就找到問題了 最主要是說 webClientId 要用 OAuth 2.0 Client ID 裡面的 Web client 這個才行 iOS 用其他的都可以執行 唯獨 Android 一定要用這一個 後來才知道裡面一堆人說 5.2.1 可以 work 為什麼不讓我早點看到這篇呢 orz... My Environment meteor : 1.7.0.5 cordova cli : 8.1.0 cordova-plugin-googleplus : 5.3.2

Google Cloud Message(GCM) Unauthorized

如果你發送推撥 Push Notification 遇到 Google 回應 Unauthorized 可以先檢查 Google Develop Console 的 white list 是否有加入主機的 IP 請注意一下是否你的主機有支援 IPV6 如果有也請把 IPV6 address 一併加入 以我使用的 LINODE 來說 設定 IPV4 還是會出現 Unauthorized 設定好 IPV6 就可以正常推撥囉! PS. IPV4 後面的 /64 可以不用加入,加入會驗證不過 Reference Android GCM Unauthorized 401 error with PHP