Use intent to perform URI during implicit activity jump

Source: Internet
Author: User
The role of the URI when intent is used for implicit activity jump:

Reprinted please indicate the source: http://www.cnblogs.com/rocky_yi

 

1. Tell the new activity where to fetch data. This is not explained.

2. ObtainMimetype to match the activity.

Using uri (such as content: // rockyproviderauthority/XXX), the system can analyze the Authority section (rockyproviderauthority ). Then, the system goes to androidmanifest. XML to find the provider class (for example, rockyprovider) whose authority is rockyproviderauthority ). The definition of provider in androidmanifest. XML is as follows:

< Provider
Android: Name = "Rockyprovider"
Android: Authorities = "Rockyproviderauthority"
/>

After obtaining the rockyprovider class, the system will call the GetType () method of this provider to obtain mimetype (all providers will implement the GetType () method ).

The obtained mimetype is used for activity matching. The intent-filter explicitly specifies that mimetype is the expected mimetype activity.

 

If I am not clear, you can take a look at this article.Article: Http://kb.cnblogs.com/page/78303/

 

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.