0

I'm trying to make some tests with beacons, i've read that you can trigger an app install through google nearby notifications, i'm buying some beacons, but while they don't arrive i'm trying to learn using the app "beacon simulator", i can easily display https urls, but URLs to play store don't work, i've read somewhere that you can't use links to google play, you have to use an intent instead.

so how can i send a notification to trigger an app install using beacons?

veccher
  • 23
  • 4

1 Answers1

0

Here are the steps:

  1. Sign up for a Google Developer account
  2. Go to the Google Beacon Dashboard and register your beacon
  3. Add a Nearby notification attachment url to your beacon. You can read an overview of how to do this here.
  4. 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.

davidgyoung
  • 63,876
  • 14
  • 121
  • 204
  • Can i still download an app without step 4? i don't have an app, i'm just using it for testing purposes for now, so i was trying to test with random apps (that are not mine), i don't want to trigger specif actions in an installed app, i just want that the notification leads to the download Lets say i just wan't to lead the user to install pokemon go through the notification, the following URL would work? intent://;;package=com.nianticlabs.pokemongo or the first 2 parameters can't be empty/null? – veccher Sep 26 '18 at 13:19
  • Sure, if you don't have a app, just use an existing defined app intent for step 3. See my answer [here](https://stackoverflow.com/a/38725107/1461050) for how to do this with the Facebook app. – davidgyoung Sep 26 '18 at 14:53