Hmmm, the suggested quoted below worked.  I wonder why.  BTW, on your
other two posts, I had tried those, no luck.  Doing the whole thing in
one statement seems to work.  I'll have to look into it.

Thanks.

On Jan 3, 8:12 pm, John Spurlock <john.spurl...@gmail.com> wrote:
> Try this:  startActivity(new Intent(Intent.ACTION_VIEW,Uri.parse
> ("market://search?q=pname:" + packageName)));
>
> Seehttp://code.google.com/android/devel/sign-publish.html#marketintent
>
> On Jan 3, 9:18 pm, Keith Wiley <kbwi...@gmail.com> wrote:
>
> > I just can't find a simple bit of sample code online that shows how to
> > do this so I'm trying to piece it together as best as I can.  Any help
> > is appreciated.
>
> > I am following the suggestions on the doc page page about publishing
> > w.r.t. notifying users of version updates.  I already have a simple
> > text file on my website that indicates the current version and I can
> > successfully read the file and check the current version against the
> > installed version, so I can notify the user that they need to update
> > (this all works), but I can't help them by launching the market app,
> > much less launching it with a specific query to my app's market page.
> > Here's how I thought it should be done:
>
> > Intent i = new Intent();
> > i.setAction("ACTION_VIEW");
> > Uri uri = Uri.parse("market://search?q=pname:<packageName>");
> > i.setData(uri);
> > try {
> >         startActivity(i);}
>
> > catch (Exception e) {
> >         String es = e.getMessage();
> >         Log.v("", es);
>
> > }
>
> > It fails with a ActivityNotFoundException.  It fails in an identical
> > fashion with several other URIs, for example:
>
> >http://market.android.com/search?q=pname:<packageName>
> > market://search?q=pub:"My Name"
> > market://search?q=MyFirstName
>
> > I am doing all of these on the actual device, not the emulator, and
> > the device has a network connection...if that makes a difference
> > although I wouldn't expect it to be necessary.
>
> > What's wrong?
>
> > Thanks.
>
>
--~--~---------~--~----~------------~-------~--~----~
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