Here is the situation:
I have a webpage that should check JavaScript if my application is already installed on the Android device it is running in.
If the application is installed, the page will show a link (with a custom protocol) for launching the application, otherwise the page should show a link to the Android market.
I can manage links to the application and to the market. The only remaining step is to detect the presence of the application on the device from JavaScript code (or, perhaps, an attempt to catch a possible error of an unsupported protocol as a reference to a non-existing application).
When I
- click link online using
- my user application protocol and
- the application is not yet installed on the device
I see that the Android environment is generating an error like "protocol is not supported." Unfortunately, I can’t fix this error in the JavaScript code to redirect the user to the Android market.
I think that both direct detection and error detection are valid methods, if they exist at all.
Any ideas how I can do this?
Thanks for the help.
source
share