I can not find a clear description for the implementation of this logic: The user scans a QR code with a link to the application in the play market, containing some uuid in the query parameter. If the application is not installed, then the user is taken to the market, and after installation, the application is launched by intent with the extra from query parameter that was in the link to the market. If the application is installed, then following the link immediately launches the application with an intent with extra from the query parameter of the link.
I found outdated documentation about the referrer, which partially closes the desired case, but not completely.
The current referrer library documentation doesn't make it clear how to pass values for the referrer. Looked at the link I also did not find information in this documentation about a case in which the application is already installed.
For new users, I use the library https://developer.android.com/google/play/installreferrer/library, and I supply the link to the playmarket with the query parameter referrer="..."
For users who have already installed the application, it is enough to process the WebLink containing my host.