Maybe I am missing something here, but your link should be to a web page on your site that actually exists. If the user arrives there, they don't have their app installed on their device (or aren't on an Android device at all), so you can tell them they need to install the app and have a link to Market. If the app already is on the device, then it is catching that URI so they get the option to launch it.
Fwiw, this is essentially how things like YouTube and maps works, except of course they are *often* pre-installed on devices (but not always), and the "fallback" web page is actually their full web site. There is also another Google service that does the full flow you are talking about, though for the life of me I can't recall what it is. On Fri, Jan 14, 2011 at 12:16 PM, ls02 <[email protected]> wrote: > I have something like this in the web page > > <a href="http://com.mycompany.myapp/do_very_cool_stuff">Click to do > Very Cool Stuff With The App</a> > > My app registers http schema and com.mycompany.myapp host so if it is > installed when user clicks on the link the app will be launched from > the page and will detect the intent and perform "Very Cool Stuff" > action. > > However if my app is not installed the browser will display "Web page > not available" error > > "The web page "http://com.mycompany.myapp/do_very_cool_stuff" might be > temporarily down..." > > I want to handle this error and instead message to user to install the > app. > > > On Jan 14, 2:33 pm, Spiral123 <[email protected]> wrote: > > I would recommend you re-read the earlier post from Marcin. Let your > > web page detect a Mobile browser and display a market:// link to your > > app. > > > > If the user follows the link to the Market, it will detect if the app > > is already loaded on your phone and will prompt you to either Install > > it or Open it....which is the behavior you are asking for. > > > > I also don't understand how the user can try to 'launch your app if it > > is not installed' - if it's not installed he won't be able to see it > > let alone launch it, so he's not going to get any 'ugly error'. Of > > course, if what you are really trying to do is get your web page to > > launch an app on my phone when I visit it then.........please give me > > the address of your web page so I know never to go there. :-) > > > > On Jan 14, 2:10 pm, ls02 <[email protected]> wrote: > > > > > > > > > The app is launched from the web page to perform certain action. I do > > > not want to discuss why I need to do this. I want to know how to > > > detect app is installed or not and if it is not possible how to handle > > > the error in the web page when user tries to launch my app and it is > > > not installed. Right now the browser gives the same ugly error as > > > general invalid link error. > > > > > On Jan 14, 1:01 pm, TreKing <[email protected]> wrote: > > > > > > On Fri, Jan 14, 2011 at 11:35 AM, ls02 <[email protected]> wrote: > > > > > But can I at least handle exception when user clicks on the link to > open > > > > > the app and the app is not installed? > > > > > > What reason do you have for trying to launch your own app from your > website? > > > > If the user has your app I'm sure they can figure out how to open it. > > > > > > > --------------------------------------------------------------------------- > ---------------------- > > > > TreKing <http://sites.google.com/site/rezmobileapps/treking> - > Chicago > > > > transit tracking app for Android-powered devices- Hide quoted text - > > > > - Show quoted text - > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Dianne Hackborn Android framework engineer [email protected] Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

