Here are the steps:
- Sign up for a Google Developer account
- Go to the Google Beacon Dashboard and register your beacon
- Add a Nearby notification attachment url to your beacon. You can read an overview of how to do this here.
- Update your app to respond to app intents.
That link talks about using a "web fallback" to display a web page in the case where your app is not installed. Don't do that -- you want the Play Store to be loaded instead so the user can install your app.
You will also need to include an app intent in the Nearby notification attachment url, so if you app is already installed, a specific intent will be sent to your app that can open a specific screen if it is already installed. You'll have to program this app intent into your app's manifest.
Here's an example of a Nearby notification attachment url to do this:
intent://myschemepath1/myschemepath2;scheme=myapp;package=com.x.y.z
In this example, your app package name is com.x.y.z and your custom app URL scheme that would launch your app is myapp://myschemepath1/myschemepath2
Simply replace the specifics with the package name for your app and the app scheme elements of your app scheme. You can read more about creating app intents here.