6

I have an app in which a user has to sign up/ sign in to view content (the destination link).

Currently, when I create a dynamic link in the firebase console, and I open the link on the android device, the link directs to the playstore as expected. After installing the app, the playstore says continue, after which the content view is directly opened, instead of waiting for my call of AppInvite.AppInviteApi.getInvitation() in another activity, post sign in / sign up.

I do have autoLinkOpen set to true, but I suppose the link should be auto launched after my call to AppInvite.AppInviteApi.getInvitation()

Edit: I'm observing that this happens only after tapping on 'Continue' in playstore, post installing the app. If, the playstore is closed after installing the app, and the app is launched from the home screen launcher, the process works perfectly fine.

Any ideas on how to fix this situation ?

milindbableshwar
  • 256
  • 1
  • 3
  • 9

1 Answers1

0

I finally found a work around. I'm directing my deeplink to a specific activity which will handle all the deeplinks and route them appropriately. In this activity, I'm checking if the user has logged in. If not, I cache the deeplink url in a pref. Then, before doing my getInvitation method call, I'm checking if any deeplink has been cached in the pref. If so, I open that deeplink appropriately.

milindbableshwar
  • 256
  • 1
  • 3
  • 9
  • Thanks @milindbableshwar for this post. I haven't quite gotten this far but was already wondering how to resolve the necessity of the user being logged in to be able to use my app and then retrieving the invite after logging in. I was considering to stash the invite in a preference, look for it after login and then process it. If you had luck with this approach I'll be happy to hear news! – Lucy Jul 18 '18 at 12:19