On 12 August 2010 16:16, sblantipodi <perini.dav...@dpsoftware.org> wrote:
> I haven't got a real device at the moment,
> so if the http://market.android.com/details?id=URL doesn't work well
> (I use it using intent) why is documented?
> I can't understand it...
>
> So the suggestion is to use:
> Intent marketIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(
>                                "market://search?q=pname:" +
> packageName()));
>                        startActivity(marketIntent);
>                        finish();

it FCs because you do not catch any exception (especially ActivityNotFound
which most likely is thrown there)

try {
  startActivity(marketIntent);
} catch( Exception e )  {
  ....
}

also, if you know package name, instead of "search" use "details" which
redirect you to package details page (if such package exists for that
device).

-- 
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