I have two Android apps. Activating a particular feature in one should send an intent to the other, but if that other application is not installed, I have to send the user to Play to install it.
I know how to detect whether the other app is installed and how to open the market – Download app if intent not installed – and I’m aware that I could set up a listener to detect when the second application is freshly installed and in principle send it the intent I first wanted to send – How to catch or receive android os ' broadcasts' of installed applications? – but is there a way to embed the intent I wanted to send to the other app into the play-launching intent, so it will be activated automagically when that other app is installed?
You can’t intervene on the play-launching intent.
What you can do is, as you said, listen for the install of the app.
Once the app is installed, send it an intent containing any data you would like it to receive.
In the receiving application, take that intent and store the data to SharedPreferences or to a file. Once the user installs the newly opened app, check for that data in the main activity and use it accordingly.