Android call app market in mobile phone, go to scoring function realization

Source: Internet
Author: User

In the software we often use, we can often see in the Software settings interface, there is a function that is to go to the scoring function, as long as we click "to score" will call the mobile phone app market software. At first I thought that the implementation of this feature is to traverse the entire phone package name, to match the market most of the application market software, this method is very troublesome. After the study, it was found that this function is very easy to implement.

With four lines of code, you can call out all the app markets installed on your phone.

The code is as follows:

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

Believe it or not? Do not believe hurriedly try, believe the hurriedly collection and share it, convenient to keep for later use.

Android call app market in mobile phone, go to scoring function realization

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.