0

I'd like to launch my app with input parameters from a Web link, or fallback on going to the market page for my app, so that user could install it.

The question is how to have the user install the app and launch it from the market app, but with the input parameters.

Something along the lines of the following:

market://search?q=<query>&params=start?a=foo&b=bar
New Dev
  • 48,427
  • 12
  • 87
  • 129
  • It seems impossible. Since after installing, the user just hits button _Open_ to open the app. But I wonder why you need to provide parameters for the app? –  Feb 21 '12 at 02:55
  • See if the answer [here](http://stackoverflow.com/questions/9346424/android-is-there-a-way-to-change-mediaplayer-urls/9346563#9346563) helps you out. – yorkw Feb 21 '12 at 03:03
  • Sorry, no... The question there is different. – New Dev Feb 21 '12 at 16:13
  • The reason I need to provide parameters is that the app needs to be invoked from the web and is very context sensitive. The problem is, as I've stated, is that I don't know whether the app is installed on user's device. – New Dev Feb 21 '12 at 16:14

1 Answers1

0

You can construct a URL that will start your app from the device's browser, and to a limited extent, provide extra parameters in it.

<a href="intent:Intent;component=com.your.app/.YourActivity;end">Do thing!</a>

You'll need to enable the BROWSABLE filter for your Activity.

This is kind of bad form, though since any non-Android browser that runs across this link will react badly to it.

Argyle
  • 3,324
  • 25
  • 44
  • That's not enough... What I want is to have a single URL to either launch an app with params or go to market app, install, and then launch the app with params. – New Dev Feb 21 '12 at 16:16
  • @NewDev Since there's no way for the web browser to detect if the app is installed on the user's device, you're out of luck. – Argyle Feb 21 '12 at 17:49