Android Deep linking: Use the same link for the app and the play store
I have a website which enables the user to make a search query. The query might take some time to complete (minutes to days), and I would like to enable the user to download an Android app and receive the answer there, by sending an email with a link to the user. I would like this mechanism to work whether the user has the app installed or not; in other words: If the user has the app it should be opened with deep link that contains an identifier argument. If the user does not have it it should open the play store on the app's page (e.g. https://play.google.com/store/apps/details?id=com.bar.foo