> Thanks Mark. Here is my problem in more detail:
>
> I want to bring up the Market details page of another one of my apps
> so I fire off an intent to:
>
> market://details?id=com.mycompany.myapp
>
> Three things can go wrong with this (OK, maybe more, but...):
>
> 1. market:// scheme cannot be resolved
> 2. no internet connection
> 3. package not found
>
> In the case of 2 I get a dialog box saying "A network error has
> occurred...".
> In the case of 3 I get a dialog box saying "A server error has
> occurred...".
>
> Neither of these are very intuitive for the user.
>
> I'm not sure what happens in case 1 - still need to test that (hence
> this topic).
>
> Maybe my question is more "How to check whether the market:// scheme
> can be resolved?".

Ah. In that case, pass your Intent to PackageManager's
queryIntentOptions() method. If you get back an empty list, Market will
not be available (more accurately, nothing will be able to handle your
Intent).

I think you can use ConnectivityManager to handle scenario #2.

If by "package not found" in #3 you mean that com.mycompany.myapp doesn't
exist, I suspect there is no clean way to handle that.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to