In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces "how to achieve file association in Android". In daily operation, I believe many people have doubts about how to achieve file association in Android. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "how to achieve file association in Android". Next, please follow the editor to study!
1. MineType
MineType media type, usually in [type] / [subtype] format.
1.type
Text: for standardized representation of text information, text messages can be in multiple character sets or formats
Multipart: multiple parts used to connect the body of the message form a message, which can be different types of data
Application: used to transfer application data or binary data
Message: used to wrap an E-mail message
Image: used to transfer static picture data
Audio: used to transmit audio or audio data
Video: used to transmit moving image data, which can be a video data format edited with audio.
Main usage of 2.subtype
Text/plain (plain text)
Text/html (HTML document)
Application/xhtml+xml (XHTML document)
Image/gif (GIF image)
Image/jpeg (JPEG image)
Image/png (PNG image)
Video/mpeg (MPEG Animation)
Application/octet-stream (arbitrary binary data)
Application/pdf (PDF document)
Application/msword (Microsoft Word file)
Multipart/alternative (HTML and plain text forms of HTML messages, the same content is represented in different forms)
Application/x-www-form-urlencoded (a form submitted using the POST method of HTTP)
Multipart/form-data (ditto, but mainly used when the form is submitted with files uploaded)
3. Examples
Text/xml
4. Notes
Some basic files can already be associated, but some custom files cannot be associated, such as .pac files. At this point, you need to learn the second part of customizing file associations.
II. Data tags
1.scheme
This property is used to set the scheme part of the URI. It is the most basic property set for the specified URI, at least one scheme property must be set for the filter, otherwise, the other URI properties will be meaningless. The scheme attribute value does not have a ":" symbol ending (for example, file, not file:)
2.host
The host part of the URI authorization.
3.port
Define the port portion of the URI authorization.
The use of both host and port depends on scheme.
4.mintype
I've already talked about it.
5.path
Path specifies a complete path.
6.PathPrefix
The PathPrefix property specifies only a partial path, which matches the initial part of the path in the Intent object.
7.pathPattern
The point is that the pathPattern property specifies a full path to match the path in the Intent object, but this path can contain the following wildcards:
7.1. An asterisk (*) wildcard in which the * asterisk in the path represents the character before any number of asterisks, such as asides, followed by a, aa, aaa, aaaa,... String match.
7.2. A combination of dots and asterisks (. *) wildcard, which can be matched with any string, such as. * pac, with abpac, cpac, pac, dssf.pac, … Wait for the string to match.
III. Examples
The file I need to click on is a file like this:
1. File path: / storage/emulated/0/Android/data/ package name / files/files/Omega4040_00.00.4002_Nor.pac
two。 File name: Omega4040_00.00.4002_Nor.pac
3. Code:
At this point, the study on "how to achieve file association in Android" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.