I have a url like xyz://12345
(Implicit Intents) in the browser. I want to check if the app that is supposed to respond to this is installed. If not open the market with that app to be installed. How is it possible to do this?
3 Answers
Your application could register a cookie to the device's browser. Your javascript can then look for this cookie, and if it exists gives a url that matches your own custom scheme (so your application will pick it up). If it doesn't exist, the user gets a url to the market place instead.

- 10,908
- 1
- 31
- 37
-
I prefer doing this with agent string but approach is the same so this is great way to do it. – Igor Čordaš Mar 25 '14 at 11:22
Just make your app catch the link that leeds to the video. If the app is installed the app can catch the link and startup. If the app is not installed the page that shows the video is displayed. In this page you could check if the mobile device is an Android phone and put an add for your app on the site that links to the Android Market.
Simply said. If somebody views a video through a browser on an Android device he seems to not have your app installed because the link to the video was not intercepted. You can now ask the user if she wants to go to the market to download the app.

- 187,060
- 113
- 301
- 369
I hope i did get you right: You want to fire an intent and if it fails open the Market. This is how this works:
try {
startActivity(yourintent);
} catch (Exception ise) {
String url = "marketurl";
Intent i = new Intent(Intent.ACTION_VIEW);
i.setData(Uri.parse(url));
startActivity(i); }

- 5,070
- 2
- 28
- 51
-
No @Thommy. Its like this. I have a video streaming service. I send the link of my video as a url. The user clicks it from the browser.. If its an android device i want him to view it through my application. If my app is not installed i want him to install the app from the market to view it. – Vijay Nov 15 '11 at 09:52