<path-permission>

syntax:
<path-permission android:path="string"
                 android:pathPrefix="string"
                 android:pathPattern="string"
                 android:permission="string"
                 android:readPermission="string"
                 android:writePermission="string" />
contained in:
<provider>
description:
Defines the path and required permissions for a specific subset of data within a content provider. This element can be specified multiple times to supply multiple paths.
컨텐트 프로바이더내에 있는 데이터의 특정 부분 집합에 대한 경로path와 요구되는 퍼미션을 정의한다. 이 엘리먼트는 여러 경로를 지원하기 위해서 여러번 지정될 수 있다.
attributes:
android:path
A complete URI path for a subset of content provider data. Permission can be granted only to the particular data identified by this path. When used to provide search suggestion content, it must be appended with "/search_suggest_query".
컨텐트 프로바이더 데이터의 부분 집합에 대한 완전한 URI 경로. 퍼미션은 이 경로에 의해서 식별된 특정 데이터에만 허용될 수 있다. 검색 제안 컨텐트search suggestion content을 제공하기 위해서 이 경로가 사용될 때 이 경로의 끝에 “/search_suggest_query” 가 붙여져야 한다.
android:pathPrefix
The initial part of a URI path for a subset of content provider data. Permission can be granted to all data subsets with paths that share this initial part.
컨텐트 프로바이더 데이터의 부분 집합에 대한 완전한 URI 경로의 시작 부분. 퍼미션은 이 시작 부분을 공유하는 경로를 가지는 모든 데이터 부분 집합에 허용될 수 있다.
android:pathPattern
A complete URI path for a subset of content provider data, but one that can use the following wildcards:
  • An asterisk ('*'). This matches a sequence of 0 to many occurrences of the immediately preceding character.
  • A period followed by an asterisk (".*"). This matches any sequence of 0 or more characters.

Because '\' is used as an escape character when the string is read from XML (before it is parsed as a pattern), you will need to double-escape. For example, a literal '*' would be written as "\\*" and a literal '\' would be written as "\\". This is basically the same as what you would need to write if constructing the string in Java code.

For more information on these types of patterns, see the descriptions of PATTERN_LITERAL, PATTERN_PREFIX, and PATTERN_SIMPLE_GLOB in the PatternMatcher class.

컨텐트 프로바이더 데이터의 부분 집합에 대한 완전한 URI 경로인데 다음과 같은 와일드 카드를 사용할 수 있는 경로.
  • 별표(‘*’)는 바로 앞에 나오는 문자가 0번 이상 발생하는 것을 나타낸다.
  • 마침표 뒤에 별표가 나오는 것(“.*”)은 어떤 문자든 0번 이상 발생하는 것을 나타낸다.

문자열이 XML로부터 읽어질 때(그것이 패턴으로써 분석되기 전에) “\”는 이스케이프escape 문자로써 사용되기 때문에, 여러분은 두 개의 이스케이프escape가 필요할 것이다.: 예를 들어 글자 그대로인 ‘*’는 “\\*”로 작성되어질 것이고, 글자 그대로인 ‘\’는 “\\\\”로 작성되어질 것이다. 이것은 여러분이 만약 Java 코드 안에서 문자열을 만들 때 작성할 필요가 있는 것과 기본적으로 같다.

이러한 세 가지 타입의 패턴에 대한 더 많은 정보에 대해서는, PatternMatcher 클래스 안의 PATTERN_LITERAL, PATTERN_PREFIX, 그리고 PATTERN_SIMPLE_GLOB에 대한 설명을 보라.

android:permission
The name of a permission that clients must have in order to read or write the content provider's data. This attribute is a convenient way of setting a single permission for both reading and writing. However, the readPermission and writePermission attributes take precedence over this one.
클라이언트가 컨텐트 프로바이더 데이터를 읽거나 쓰기 위해서 가져야 하는 퍼미션 이름. 이 애트리뷰트는 읽고 쓰기 모두에 대한 하나의 퍼미션을 설정하는 편리한 방법이다. 하지만 readPermission과 writePermission 애트리뷰트가 이 애트리뷰트보다 우선 순위를 가진다.
android:readPermission
A permission that clients must have in order to query the content provider.
클라이언트가 컨텐트 프로바이더를 쿼리query하기 위해서 가져야 하는 퍼미션.
android:writePermission
A permission that clients must have in order to make changes to the data controlled by the content provider.
클라이언트가 컨텐트 프로바이더를에 의해 제어되는 데이터를 수정하기 위해 가져야 하는 퍼미션.
introduced in:
API Level 4
see also:
SearchManager
Manifest.permission
Security and Permissions
↑ Go to top