Search code examples
androidgoogle-app-invites

Emails not going out and links in SMS's giving 404


We've just finished integrating Google AppInvites into our app.

We've noticed the following issues:

Emails are not being sent and SMS's that are sent, are sent with a link that says yields a 404 page. The above issues occur only if I set our "setOtherPlatformsTargetApplication" for Android and iOS, using their clientId's.

Android: 719104993890-lclfrqti11lulpvg18tbbbuv6bah54gh.apps.googleusercontent.com

iOS: 719104993890-fq3npmoqmp7mi9839fhv6ajj8jespkot.apps.googleusercontent.com

Within the app, I'm getting back from Google invite ID's. If I remove the "setOtherPlatformsTargetApplication" then the emails and SMS's go out just fine, with the issue that when opened on an iOS device, it takes them to the Android PlayStore and not the Apple AppStore.

On Phones with a SIM card, there is text being overlaid (white text, light gray background) over our "Custom Image" that says "email only", and I can't seem to find a way to remove the overlaid text.

The app has been uploaded to the PlayStore under the "Beta" release group, still with no success.

Any ideas? @lmoroney


Solution

  • You should only specify the iOS client id using setOtherPlatformTargetApplication() from android, and only the android clientId from iOS. The target app to be installed on the same (the senders) platform has to be the exact same app that is sending the invitation which is already identified by package name(android), or bundle Id(iOS), although you can specify an upgraded version using setAndroidMinimumVersionCode(). Unfortunately calling the api and specifying the android client id from android will cause the invitation to fail as you've seen.

    This should also resolve the second issue, as long as you specify the iOS app then it will redirect all iOS receivers to the AppStore, and of course android users to the Play Store. As a side note, if the project that includes your android app clientId only has a single iOS app, then the matching iOS app is unambiguous so you can omit specifying the iOS clientId. In your case, your project must have more than one iOS client specified so you are required to disambiguate by setting the target application in the api.

    I hope that helps.