0

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}

LaurentY
  • 7,495
  • 3
  • 37
  • 55
g4gaj
  • 85
  • 2
  • 11

2 Answers2

0

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>"
      }
    }
  ],
sidecarcat
  • 482
  • 5
  • 12
  • I already added this configuration file, but still not working for me :( – g4gaj Feb 01 '16 at 08:57
  • Make sure the **certificate_hash** and **package_name** for oauth_client in your google-services.json matches the Credentials you have defined in the Developer Console. – sidecarcat Feb 01 '16 at 14:56
0

In my case I was creating dubug build. But when I change Build variants from debug to release the problem solved.

nilesh
  • 519
  • 4
  • 17