exntends:http://blog.csdn.net/wangfayinn/article/details/10351655
In the project to have a software scoring function, a very common, very simple function, but it cost me a lot of effort. The effects you need to achieve are as follows:
Would have thought that the general software will have "to score", "pro, to a favorable comment" such a function, but search on the internet did not search, asked three groups plus 5 children's shoes, analysis log, anti-compilation look at the source, finally found the URI, get him really not easy ah.
try {
Uri uri = uri.parse ("market://details?id=" + getpackagename ());
Intent Intent = new Intent (Intent.action_view, URI);
Intent.addflags (Intent.flag_activity_new_task);
StartActivity (Intent);
} catch (Exception e) {
Showtoast ("Application Market not Installed");
E.printstacktrace ();
}
With the above code, you can list all the app markets installed on your phone (e.g. Google player, pea pods, 360 mobile phone assistants, etc.) and let you choose.
Add a fringe benefit, and put the code for the call to share, lest you look around for it later:
New Intent (); Sendintent.setaction (intent.action_send); Sendintent.settype ("text/*"); Sendintent.putextra (Intent.extra_text, Contentedittext.gettext (). toString ()); StartActivity (sendintent);
Android calls installed market for software scoring feature implementation