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

Reply via email to