问题
I am using Android Google App invite sample and following all guidelines but it is not sending any messages and emails, it gives message
Message Failed to Send
and in logs i am getting
onActivityResult: requestCode=0, resultCode=3`
getInvitation:onResult:Status{statusCode=CANCELED, resolution=null}
回答1:
One possibility is an issue with your client configuration file. Make sure you followed Step 2: get a configuration file in the App Invites guide and have added the the google-services.json file to your project.
Check that package_name and certificate_hash match your credentials in Developers Console for the Default Demo App. Note: the certificate_hash will not have the colon delimiters.
// 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>"
}
}
],
回答2:
In my case I was creating dubug build. But when I change Build variants from debug to release the problem solved.
来源:https://stackoverflow.com/questions/34940408/android-google-app-invite-sample-is-not-sending-email-and-message-what-i-am-doin