 |
Storing, Retrieving and Exposing DataA typical desktop operating system provides a common file system that any application can use to store and read files that can be read by other applications (perhaps with some access control settings). Android uses a different system: on Android, all application data (including files) are private to that application. However, Android also provides a standard way for an application to expose its private data to other applications. This section describes the many ways that an application can store and retrieve data, expose its data to other applications, and also how you can request data from other applications that expose their data.
전통적인 데스크탑 운영체제는 어떤 애플리케이션이든 파일을 저장하고 읽을수 있고 다른 애플리케이션 에 의해 읽어질 수도 있는(아마 약간의 접근제어 설정을 가지는) 일반적인 파일 시스템을 제공한다. 안드로이드는 다른 시스템을 사용한다: 안드로이드에서 모든 애플리케이션 테이타(파일을 포함하는)는 해당 애플리케이션에만 허용된다. 그렇지만, 안드로이드는 또한 사적인 데이타를 다른 애플리케이션이 볼 수 있도록 하기 위한 표준방법을 제공한다. 이 섹션은 애플리케이션이 데이타를 저장하고 얻을 수 있고 그 데이타를 다른 애플리케이션에게 보여줄 수 있는 많은 방법을 설명한다. 그리고 또한 여러분의다른 애플리케이션의 데이타를 보기 위해 다른 애플리케이션들에게 어떻게 데이타를 요청할 수 있는지를설명한다. Android provides the following mechanisms for storing and retrieving data: 안드로이드는 데이타를 저장하고 얻기 위해 다음과 같은 메카니즘을 제공한다.
- Preferences
- A lightweight mechanism to store and retrieve key/value pairs of primitive data types. This
is typically used to store application preferences. 기본적인 데이타 타입들의 Key/Value 쌍을 저장하고 얻기 위한 가벼운 메카니즘. 이것은 전통적으로 애플리케이션의 설정들을 저장하기 위해 사용된다.
- Files
- You can store your files on the device or on a removable storage medium. By default, other
applications cannot access these files. 여러분은 디바이스나 분리가능한 저장 매체에 여러분의 파일을 저장할 수 있다. 기본적으로는 다른 애플리케이션은 이 파일들을 접근할 수 없다.
- Databases
- The Android APIs contain support for SQLite. Your application can create and use a private
SQLite database. Each database is private to the package that creates it. 안드로이드 API는 SQLite 지원을 포함한다. 여러분의 애플리케이션은 사적인 SQLite 데이타베이스 를 생성할 수 있고 사용할 수 있다. 각각의 데이타베이스는 그것을 생성한 패키지에 사적으로 귀속된다.
- Content Providers
- A content provider is a optional component of an application that exposes read/write access
to an application's private data, subject to whatever restrictions it wants to impose. Content providers implement a standard request syntax for data, and a standard access mechanism for the returned data. Android supplies a number of content providers for standard data types, such as personal contacts. content provider는 애플리케이션의 사적 데이타에 대한 읽고/쓰기 접근을 제공하는 애플리케이션 의 선택가능한 컴포넌트이고, subject to whatever restrictions it wants to impose. Content provider는 데이타에 대한 표준 요청 구문을 구현하며, 그리고 반환 데이타에 대한 표준 접근 메카니즘을 구현한다. 안드로이드는 개인전화번호부(?)같은 표준 데이타 타입에 대한 약간의 content provider를 제공한다.
- Network
- Don't forget that you can also use the network to store and retrieve data.
여러분이 데이타를 저장하고 얻기위해 네트워크를 사용할 수 있는 것 또한 잊지마라. |
※ 회원등급 레벨 0 이상 읽기가 가능한 게시판입니다.
16
|