[android-developers] Re: Detect if app is installed

2011-01-18 Thread Brill Pappin
Nice rundown Bob! The only issue is using the http:// but I think for what your describing he will have to, because if the app doesn't exist, he wants it to the real site and load a real html page. I'm not sure what effect this is going to have on other apps, but if the URL is unique enough then

Re: [android-developers] Re: Detect if app is installed

2011-01-18 Thread Dianne Hackborn
The URI should be on *your* web site, as part of that same web site that you have put the link. That makes it unique. It is your own site. There are no tricks on the web site needed. It is just a regular web site, with a link to another regular part of the web site. The only thing different

Re: [android-developers] Re: Detect if app is installed

2011-01-17 Thread Dianne Hackborn
Honestly, the approach I have outlined *does* work and you can already see it in use by various Google properties like Maps and YouTube. Please don't play tricks with custom schemes -- remember, the URI scheme is a *global* namespace, and if you are putting it up on a web site you are putting it

[android-developers] Re: Detect if app is installed

2011-01-14 Thread Brill Pappin
No, not really. Which is a good thing, or we'd have security and privacy issues. You might be able to do it with a custom browser inside your own app. It's not hard to try and launch another app and/or have the device ask the user to install it. - Brill Pappin -- You received this message

[android-developers] Re: Detect if app is installed

2011-01-14 Thread ls02
When user is browsing my Web site in Android default Web browser I want to detect that my own app is not installed on user's phone and give user a message to install it. Otherwise I just show the link to launch the app. On Jan 14, 12:04 pm, TreKing treking...@gmail.com wrote: On Fri, Jan 14,

[android-developers] Re: Detect if app is installed

2011-01-14 Thread ls02
But can I at least handle exception when user clicks on the link to open the app and the app is not installed? On Jan 14, 12:12 pm, Brill Pappin br...@pappin.ca wrote: No, not really. Which is a good thing, or we'd have security and privacy issues. You might be able to do it with a custom

Re: [android-developers] Re: Detect if app is installed

2011-01-14 Thread Marcin Orlowski
On 14 January 2011 18:14, ls02 agal...@audible.com wrote: When user is browsing my Web site in Android default Web browser I want to detect that my own app is not installed on user's phone and give user a message to install it. Otherwise I just show the link to launch the app. You are

Re: [android-developers] Re: Detect if app is installed

2011-01-14 Thread TreKing
On Fri, Jan 14, 2011 at 11:35 AM, ls02 agal...@audible.com 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

[android-developers] Re: Detect if app is installed

2011-01-14 Thread ls02
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

[android-developers] Re: Detect if app is installed

2011-01-14 Thread Spiral123
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

Re: [android-developers] Re: Detect if app is installed

2011-01-14 Thread TreKing
On Fri, Jan 14, 2011 at 1:10 PM, ls02 agal...@audible.com 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. Well, if explain your use case you can probably get a better answer. I, for one, do not see the purpose to doing

[android-developers] Re: Detect if app is installed

2011-01-14 Thread ls02
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

[android-developers] Re: Detect if app is installed

2011-01-14 Thread Brill Pappin
Are you able to launch your app if its not installed now? If you can launch an intent (which I hipe you can't) then take a look at the zxing project. They use code so that if you try to launch with their intent and its not installed, it prompts the user to install it. However my guess is that is

[android-developers] Re: Detect if app is installed

2011-01-14 Thread Brill Pappin
I think we've pretty much said we don't think it is. I for one don't know of any way you can do that, and if you can, I think it's a *very* large security hole in the Android OS that I'll submit a ticket to get fixed ASAP. - Brill Pappin On Jan 14, 2:10 pm, ls02 agal...@audible.com wrote: The

[android-developers] Re: Detect if app is installed

2011-01-14 Thread Brill Pappin
Ok, that is a much better explanation. You can control the error your site displays to the user through your web server. However the error you mention looks like it comes from the client browser anyway. I'm sure with a little thought you can use come ajax trickery to make this look better and

Re: [android-developers] Re: Detect if app is installed

2011-01-14 Thread TreKing
On Fri, Jan 14, 2011 at 2:16 PM, ls02 agal...@audible.com wrote: 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. Thanks. This of

[android-developers] Re: Detect if app is installed

2011-01-14 Thread ls02
I obviously do not want to show the link to Android market app install if user has already app installed. On Jan 14, 3:40 pm, TreKing treking...@gmail.com wrote: On Fri, Jan 14, 2011 at 2:16 PM, ls02 agal...@audible.com wrote: My app registers http schema and com.mycompany.myapp host so if it

Re: [android-developers] Re: Detect if app is installed

2011-01-14 Thread TreKing
On Fri, Jan 14, 2011 at 3:13 PM, ls02 agal...@audible.com wrote: I obviously do not want to show the link to Android market app install if user has already app installed. As I said, if your user has your app installed, you can control the Webview, which includes which pages you show them,

[android-developers] Re: Detect if app is installed

2011-01-14 Thread ls02
User may land on my Web page in external Web browser in which case I have no control to inject any code from the app. Say you have a Web page that uses Flash. Do you want to mesage to your customers link to install Flash EVERY SINGLE TIME they visit your page instead of trying to dynamically

Re: [android-developers] Re: Detect if app is installed

2011-01-14 Thread TreKing
On Fri, Jan 14, 2011 at 3:37 PM, ls02 agal...@audible.com wrote: User may land on my Web page in external Web browser in which case I have no control to inject any code from the app. Correct. Which is why this is where you display the generic market URL, even if they're on their phones and

Re: [android-developers] Re: Detect if app is installed

2011-01-14 Thread Kostya Vasilyev
I can understand where you're coming from. It annoys me to see an ad for an Android app, taking up valuable screen real estate, every time I visit the IMDB. What would work for me as a user is a simple close box next to this advertisement, which would be remembered between visits (saved as a

Re: [android-developers] Re: Detect if app is installed

2011-01-14 Thread Dianne Hackborn
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

[android-developers] Re: Detect if app is installed

2011-01-14 Thread Indicator Veritatis
Well, I am afraid a lot of us are 'missing something here. But frankly, that is because the OP does not express himself very well. So no wonder he gets some telling him it is impossible, others telling him how to do something somewhat different from what he wants. But be that as it may, I believe

Re: [android-developers] Re: Detect if app is installed

2011-01-14 Thread TreKing
On Fri, Jan 14, 2011 at 6:29 PM, Indicator Veritatis mej1...@yahoo.comwrote: But be that as it may, I believe the reason he will not considers yours a solution is that if his application is installed but not running, or if for any reason it is not registered to handle the Intent, then no, it

[android-developers] Re: Detect if app is installed

2011-01-14 Thread ls02
I am not sure I follow you with your link should be to a web page on your site that actually exists. The link to launch the app is not actually a real Web page link. Yes, I reuse http schema but com.mycompany.myapp is not a site, it is the host that my app activity registers to handle. On Jan

Re: [android-developers] Re: Detect if app is installed

2011-01-14 Thread TreKing
On Fri, Jan 14, 2011 at 8:35 PM, ls02 agal...@audible.com wrote: The link to launch the app is not actually a real Web page link. Right and she's saying it *should* be. So if there's no app, it still works to go somewhere on your site (perhaps redirecting them to the Android Market). If there

[android-developers] Re: Detect if app is installed

2011-01-14 Thread Brill Pappin
Actually, I understand what hes trying to do. He wants to launch *his* application from a link in an html page or detect if its not there. What he's saying is that hes registered a content URL http://com.hisappname but if the app doesn't exist he gets a terrible error in the native browser

[android-developers] Re: Detect if app is installed

2011-01-14 Thread Brill Pappin
Ok, this is what I want you to try. 1) don't use the http:// for you content URL. it should be something related to your app. 2) for your link, link to a real web page that simply has a Launching app... on it. 3) when that page loads, use a javascript call to try and launch your application and