2016-01-22 28 views
0

我使用谷歌Android應用程序邀請樣品和下面的所有準則,但它不發送任何消息和電子郵件,它給郵件發送失敗Android Google App Invite示例沒有發送電子郵件和消息,我做錯了什麼?

,並在日誌中我得到

留言

onActivityResult:requestCode = 0,發送resultCode = 3`

getInvitation:onResult:狀態{的StatusCode =取消,RESO lution = null}

+0

鏈接到示例代碼? – childofthehorn

+0

https://github.com/googlesamples/google-services/tree/master/android/appinvites – g4gaj

+0

這是示例代碼的鏈接,我使用https://github.com/googlesamples/google-services/tree/ master/android/appinvites – g4gaj

回答

0

一種可能性是您的客戶端配置文件存在問題。確保你在App Invites指南中關注了Step 2: get a configuration file,並將google-services.json文件添加到了您的項目中。

檢查package_name和certificate_hash是否與開發人員控制檯中用於默認演示應用程序的憑據相匹配。注意:certificate_hash不會有冒號分隔符。

// from: google-services.json 
    ... 
    "oauth_client": [ 
    { 
     "client_id": "<id>", 
     "client_type": 1, 
     "android_info": { 
     "package_name": "com.google.android.gms.samples.appinvite", 
     "certificate_hash": "<Signing-certificate fingerprint>" 
     } 
    } 
    ], 
+0

我已經添加了這個配置文件,但仍然沒有爲我工作:( – g4gaj

+0

請確保在你的谷歌oauth_client的** certificate_hash **和** package_name ** -services.json與您在Developer Console中定義的憑證相匹配。 – sidecarcat

0

在我的情況下,我創建了dubug構建。但是,當我從調試更改生成變體以解決問題時。

相關問題