[Android] Adding Custom Suggestions

보통의 안드로이드 어플들 내부적으로 검색기능이 존재하지 않는 경우가 많기도 하며, 정말 좋은 효과를 얻을 수 있는 QSB라는 프레임워크가 내장되어 있음에도 활용하지 아니하는 경우가 많다. 아래의 QSB 프레임워크를 적극 활용하여 어플 외부에 있는 사용자들은 우리의 어플 내부로 끌어들이는 방안에 대해 알아보자. 


Adding Custom Suggestions 
http://developer.android.com/guide/topics/search/adding-custom-suggestions.html


When using the Android search dialog or search widget, you can provide custom search suggestions that are created from data in your application.

안드로이드 검색 다이얼로그나 검색위젯을 사용할때에, 당신은 당신의 어플리케이션 내의 데이터로부터 만들어진 커스텀 검색제안을 제공할 수 있습니다.

 

For example, if your application is a word dictionary, you can suggest words from the dictionary that match the text entered so far.

예를들어 당신의 어플리케이션이 단어사전이라면, 당신은 입력된 글자와 매칭하여 사전으로부터 단어들을 제안할 수 있습니다.

 

These are the most valuable suggestions, because you can effectively predict what the user wants and provide instant access to it.

여기에 가장 값진 제안들이 있습니다. 왜냐하면 당신은 사용자가 원하는 것을 효과적으로 예측할 수 있으며 즉각 그것을 처리하여 제공할 수 있기 때문입니다.


(스크린샷 생략)


Figure 1. Screenshot of a search dialog with custom search suggestions.

보기 1. 커스텀 검색 제안을 이용한 검색 다이얼로그의 스크린샷

 

Figure 1 shows an example of a search dialog with custom suggestions.

보기 1은 검색 커스텀 제안을 이용한 다이얼로그의 예를 보여줍니다.

 

Once you provide custom suggestions, you can also make them available to the system-wide Quick Search Box, providing access to your content from outside your application.

일단 커스텀 제안을 제공하면, 또한 당신은 당신의 어플리케이션 외부에서 당신의 컨텐츠에 접근할 수 있도록 하는 시스템 전역적인 QSB에도 그것을 사용가능하도록 만들 수 있습니다.

 

Before you begin with this guide to add custom suggestions, you need to have implemented the Android search dialog or a search widget for searches in your application.

커스텀 제안을 추가하는 방법에 대한 가이드를 시작하기에 앞서, 당신은 어플리케이션 내에서의 검색을 위한 안드로이드 검색 다이얼로그나 검색 위젯의 구현이 반드시 필요합니다.

 

If you haven't, see Creating a Search Interface.

만약 아직 구현하지 않으셨다면, 검색 인터페이스를 생성하는 방법을 읽어보세요.

 

The Basics

When the user selects a custom suggestion, the Android system sends an Intent to your searchable activity.

사용자들이 커스텀 제안을 선택할때에, 안드로이드 시스템은 당신의 검색가능한 액티비티에게 인텐트를 보냅니다.

 

Whereas a normal search query sends an intent with the ACTION_SEARCH action, you can instead define your custom suggestions to use ACTION_VIEW (or any other intent action), and also include data that's relevant to the selected suggestion.

일반적인 검색 쿼리가 ACTION_SEARCH 액션을 이용해 인텐트를 전송하는 것과는 달리, 당신의 커스텀 제안을 선언하는 것을 대신하여 ACTION_VIEW(또는 어떠한 다른 인텐트 액션)를 사용할 수 있고 또한 선택된 제안과 관련된 데이터를 포함할 수 있습니다.

 

Continuing the dictionary example, when the user selects a suggestion, your application can immediately open the definition for that word, instead of searching the dictionary for matches.

계속해서 이전 예제를 보면, 사용자가 제안을 선택하였을 때에 어플리케이션은 매칭을 위해 사전을 찾는 것 대신에 즉각적으로 그 단어의 뜻을 오픈할 수 있습니다.

 

To provide custom suggestions, do the following:

커스텀 제안기능을 제공하려면, 다음과 같이 하시면 됩니다.

 

  - Implement a basic searchable activity, as described in Creating a Search Interface.

     검색 인터페이스를 생성하는 것을 담고있는 기본 searchable 액티비티를 구현하십시오.

 

  - Modify the searchable configuration with information about the content provider that provides custom suggestions.

     커스텀 제안기능을 제공할 컨텐츠 프로바이더에 대한 정보를 가진 searchable 설정파일을 수정하십시오.

 

  - Build a table (such as in an SQLiteDatabase) for your suggestions and format the table with required columns.

     당신의 제안기능을 위한 (SQLite 데이터베이스와 같은) 테이블을 생성하고 필요한 열을 테이블에 구성하십시오.

 

  - Create a Content Provider that has access to your suggestions table and declare the provider in your manifest.

     당신의 제안기능 테이블에 접근가능하고 매니페스트 설정파일에 프로바이더로 선언한 컨텐츠 프로바이더를 생성하십시오.

 

  - Declare the type of Intent to be sent when the user selects a suggestion (including a custom action and custom data).

     사용자가 제안기능의 항목을 선택(커스텀 액션과 커스텀 데이터를 포함함) 하였을때에 보내어질 인텐트의 형식을 설정하십시오.

 

Just as the Android system displays the search dialog, it also displays your search suggestions.

안드로이드 시스템이 검색 다이얼로그를 출력하는 것처럼, 그것은 또한 당신의 검색 제안들을 출력합니다.

 

All you need is a content provider from which the system can retrieve your suggestions.

당신의 제안을 검색하는데에 필요한 모든 것은 컨텐츠 프로바이더 입니다.

 

If you're not familiar with creating content providers, read the Content Providers developer guide before you continue.

컨텐츠 프로바이더의 생성에 익숙하지 않은 경우에는 진행에 앞서  Content Providers 개발가이드를 먼저 참조하십시오.

 

When the system identifies that your activity is searchable and provides search suggestions, the following procedure takes place when the user types a query:

당신의 액티비티가 검색가능하며 검색제안 기능을 제공할 수 있다는것을 시스템이 인식할때에, 사용자의 쿼리 입력시 다음과 같은 일련의 절차가 이루어집니다.

 

  1. The system takes the search query text (whatever has been typed so far) and performs a query to your content provider that manages your suggestions.

      (현재까지 입력되어진) 검색 쿼리 문장을 시스템이 인식하고 당신의 컨텐츠 프로바이더를 이용하여 당신의 제안기능을 관리하기 위한 검색을 수행합니다.

 

  2. Your content provider returns a Cursor that points to all suggestions that are relevant to the search query text.

      당신의  컨텐츠 프로바이더는 검색쿼리 텍스트와 관련된 모든 제안항목들을 가리키는 커서를 반환합니다.

 

  3. The system displays the list of suggestions provided by the Cursor.

      시스템은 커서에 의해 제공된 제안항목 리스트를 출력합니다.

 

Once the custom suggestions are displayed, the following might happen:

커스텀 제안항목들이 출력되면, 다음과 같은 일들이 일어납니다.

 

  - If the user types another key, or changes the query in any way, the above steps are repeated and the suggestion list is updated as appropriate.

    사용자가 다른 어떠한 키를 누르는 경우이거나 어떠한 방법으로든 쿼리를 변경하게되면, 위에 언급된 과정이 반복되며 적절하게 업데이트된 제안항목을 리스팅합니다.

 

  - If the user executes the search, the suggestions are ignored and the search is delivered to your searchable activity using the normal ACTION_SEARCH intent.

     사용자가 검색을 실행하는 경우, 제안항목은 무시되고 일반적인 ACTION_SEARCH 인텐트를 사용하는 당신의 검색가능한 액티비티에게 검색기능을 위임합니다. 

 

  - If the user selects a suggestion, an intent is sent to your searchable activity, carrying a custom action and custom data so that your application can open the suggested content.

     사용자가 제안항목을 선택하면 어플리케이션이 제안된 콘텐츠를 열 수 있도록 인텐트는 사용자 커스텀 액션과 사용자 정의 데이터를 운반하여 검색 액티비티로 전송됩니다.

 

 

Modifying the searchable configuration

To add support for custom suggestions, add the android:searchSuggestAuthority attribute to the <searchable> element in your searchable configuration file. For example:

커스텀 제안기능을 위한 지원을 추가하려면,  android:searchSuggestAuthority 속성을 검색을 위한 설정파일의 <searchable> 항목에 추가하십시오. 예를 들면...

 

<?xml version="1.0" encoding="utf-8"?>

<searchable xmlns:android="http://schemas.android.com/apk/res/android"

    android:label="@string/app_label"

    android:hint="@string/search_hint"

    android:searchSuggestAuthority="com.example.MyCustomSuggestionProvider">

</searchable>

 

You might need some additional attributes, depending on the type of intent you attach to each suggestion and how you want to format queries to your content provider.

당신은 각 제안에 첨부하는 인텐트의 유형과 컨텐츠 공급자에게 쿼리를 지정하는 방법에 따라 몇 가지 추가 속성을 해야 할 수 있습니다.

 

The other optional attributes are discussed in the following sections.

기타 추가적인 속성에 대해서는 다음의 섹션에서 논의하겠습니다.

 

Creating a Content Provider

Creating a content provider for custom suggestions requires previous knowledge about content providers that's covered in the Content Provider developer guide.

커스텀 제안기능을 위한 컨텐츠 프로바이더를 생성하는 것은 Content Provider 개발가이드에 수록된 컨텐츠 프로바이더에 대한 사전지식을 필요로 합니다.

 

For the most part, a content provider for custom suggestions is the same as any other content provider.

대부분의 경우, 커스텀 제안기능을 위한 컨텐츠 프로바이더는 일반적인 컨텐츠 프로바이더와 동일합니다.

 

However, for each suggestion you provide, the respective row in the Cursor must include specific columns that the system understands and uses to format the suggestions.

그러나 당신이 제공하는 각 제안항목에 대해, 커서의 각 행은 시스템이 이해할수 있는 내용 및 제안사항을 양식을 사용하는 특정 열을 포함해야합니다.

 

When the user starts typing into the search dialog or search widget, the system queries your content provider for suggestions by calling query() each time a letter is typed.

사용자가 검색 다이얼로그나 검색 위젯에 타이핑을 시작할때에, 시스템은 글자가 타이핑 될때마다 query()를 호출함으로서 제안기능을 위한 당신의 컨텐츠 프로바이더를 조회합니다.

 

In your implementation of query(), your content provider must search your suggestion data and return a Cursor that points to the rows you have determined to be good suggestions.

당신의 query() 구현모듈에서 당신의 컨텐츠 프로바이더는 반드시 제안기능 데이터를 검색해야하며, 좋은 제안항목으로 선별된 행들을 가리키는 커서객체를 반환해야 합니다.

 

Details about creating a content provider for custom suggestions are discussed in the following two sections:

커스텀 제안기능을 위한 컨텐츠 프로바이더를 생성하는 것에 대한 상세한 내용은 다음 두개의 섹션에서 논의하겠습니다.

 

Handling the suggestion query

제안 쿼리를 핸들링 하는 방법

  - How the system sends requests to your content provider and how to handle them

     시스템이 당신의 컨텐츠 프로바이더에게 요청을 전달하는 방법과 그것들을 다루는 방법

 

Building a suggestion table

제안항목 테이블을 생성하는 방법

  - How to define the columns that the system expects in the Cursor returned with each query

     각 쿼리에 의해 반환된 커서내에서 시스템이 이해할 수 있는 열을 정의하는 방법

 

Handling the suggestion query

When the system requests suggestions from your content provider, it calls your content provider's query() method.

시스템이 당신의 컨텐츠 프로바이더에서 발생한 제안항목을 요청할때에, 시스템은 당신의 컨텐츠 프로바이더의 query() 메서드를 호출합니다.

 

You must implement this method to search your suggestion data and return a Cursor pointing to the suggestions you deem relevant.

반드시 당신의 검색항목 데이터를 검색할 수 있는 이 메서드를 구현해야하며, 적합한 제안항목을 가리키고 있는 커서 객체를 반환해야 합니다.

 

Here's a summary of the parameters that the system passes to your query() method (listed in order):

다음은 시스템에서 당신의 query() 메서드로 전달하는 매개변수에 대한 요약내용입니다. (순서대로 나열됨)

 

uri

   Always a content Uri, formatted as:

   항상 컨텐츠 Uri이며, 형식은 이렇습니다.

 

   content://your.authority/optional.suggest.path/SUGGEST_URI_PATH_QUERY

 

   The default behavior is for system to pass this URI and append it with the query text. For example:

   시스템이 이 URI를 통해 쿼리문장을 추가하는 것이 기본동작입니다. 예를들면 다음과 같습니다.

 

   content://your.authority/optional.suggest.path/SUGGEST_URI_PATH_QUERY/puppies

 

   The query text on the end is encoded using URI encoding rules, so you might need to decode it before performing a search.

    마지막부분의 쿼리문장은 URI 인코딩 규칙을 이용하여 인코딩 되어 있습니다. 그렇기에 검색을 수행하기 전에 그것을 디코딩 할 수도 있습니다.

 

   The optional.suggest.path portion is only included in the URI if you have set such a path in your searchable configuration file with the android:searchSuggestPath attribute.

    당신의 searchable 설정파일내의 android:searchSuggestPath 속성을 이용하여 이러한 경로를 설정하였다면 optional.suggest.path의 위치는 단지 URI 내에 포함되어진 것 입니다.

 

   This is only needed if you use the same content provider for multiple searchable activities, in which case, you need to disambiguate the source of the suggestion query.

    이것은 당신이 다수의 검색가능한 액티비티를 위해 동일한 컨텐츠 프로바이더를 사용하는 경우에만 필요합니다. 그러한 경우에 당신은 제안쿼리의 소스를 하나하나 구분할 필요가 있습니다.

 

   Note: SUGGEST_URI_PATH_QUERY is not the literal string provided in the URI, but a constant that you should use if you need to refer to this path.

   주의 : SUGGEST_URI_PATH_QUERY는 URI내에서 제공되는 리터럴 문자열이 아니지만, 당신이 이 경로를 참조할 필요가 있는경우 사용하게 될 상수입니다.

 

projection

   Always null

   항상 null 입니다.

 

selection

   The value provided in the android:searchSuggestSelection attribute of your searchable configuration file, or null if you have not declared the android:searchSuggestSelection attribute.

   당신의 searchable 설정 파일에서의 android:searchSuggestSelection 속성내에서 제공되는 값이지만, android:searchSuggestSelection 속성을 선언하지 않았다면 null 입니다.

 

   More about using this to get the query below.

   이것을 사용하는 것에 대한 상세한 내용은 'get the query'를 참조하세요.

 

selectionArgs

   Contains the search query as the first (and only) element of the array if you have declared the android:searchSuggestSelection attribute in your searchable configuration.

   당신의 searchable 설정내의 android:searchSuggestSelection 속성을 선언한 경우, 배열의 첫번째 (그리고 유일하게) 항목으로서의 검색 쿼리를 포함합니다.

 

   If you have not declared android:searchSuggestSelection, then this parameter is null. More about using this to get the query below.

   만일 android:searchSuggestSelection 항목을 선언하지 않았다면, 이 파라메타는 null 입니다. 이것에 대한 상세한 내용은 'get the query'를 참조하십시오.

 

sortOrder

   Always null

   항상 null 입니다.

 

The system can send you the search query text in two ways.

시스템이 당신에게 검색쿼리를 전송하는 방식에는 두 가지 방식이 존재합니다.

 

The default manner is for the query text to be included as the last path of the content URI passed in the uri parameter.

기본방식은 uri 파라메타에 전달되어진 컨텐츠 URI의 마지막 경로가 포함되는 쿼리문장입니다.

 

However, if you include a selection value in your searchable configuration's android:searchSuggestSelection attribute, then the query text is instead passed as the first element of the selectionArgs string array.

당신의 searchable 속성의 android:searchSuggestSelection 속성에서의 선택값을 포함하는 경우에는 selectionArgs 문자열 배열의 첫 번째 항목으로 전달되는 것 대신에 다음의 쿼리문장이 위치합니다.

 

Both options are summarized next.

두개의 옵션 모두 다음번에 요약됩니다.

 

Get the query in the Uri

By default, the query is appended as the last segment of the uri parameter (a Uri object).

기본적으로 쿼리는 uri 파라메타의 마지막 부분으로 추가됩니다. (Uri 객체)

 

To retrieve the query text in this case, simply use getLastPathSegment(). For example:

이러한 경우 쿼리문장을 검색하려면 getLastPathSegment()를 사용합니다. 예를 들면...

 

String query = uri.getLastPathSegment().toLowerCase();

 

This returns the last segment of the Uri, which is the query text entered by the user.

이것은 사용자에 의해 입력된 쿼리문인 Uri의 마지막 부분을 반환합니다.

 

Get the query in the selection arguments

Instead of using the URI, you might decide it makes more sense for your query() method to receive everything it needs to perform the look-up and you want the selection and selectionArgs parameters to carry the appropriate values.

URI를 사용하는 것 대신, 룩업 수행에 필요하며 selection과 적절한 값들을 이동시키기 위한 selectionArgs 파라메타 을 원하므로 모든것을 전달받는 것이 query() 메서드를 위해 보다 효율적이라고 결정할지도 모른다.

 

In such a case, add the android:searchSuggestSelection attribute to your searchable configuration with your SQLite selection string.

이러한 경우 SQLite selection 문자열과 함께 android:searchSuggestSelection 속성을 당신의 searchable 설정에 추가하십시오.

 

In the selection string, include a question mark ("?") as a placeholder for the actual search query.

selection 문자열 내에서는 실제검색쿼리를 위한 위치지정자로서 물음표("?")를 포함합니다.

 

The system calls query() with the selection string as the selection parameter and the search query as the first element in the selectionArgs array.

시스템은 selection 파라메타로서 selection 문자열을 이용하여 query()를 호출하며, selectionArgs 배열의 첫번째 항목으로서 검색을 조회합니다.

 

For example, here's how you might form the android:searchSuggestSelection attribute to create a full-text search statement:

여기에서는 전체 텍스트 검색 구문을 만들 android:searchSuggestSelection 속성을 구성하는 방법에 대한 예제가 있습니다.

 

<?xml version="1.0" encoding="utf-8"?>

<searchable xmlns:android="http://schemas.android.com/apk/res/android"

    android:label="@string/app_label"

    android:hint="@string/search_hint"

    android:searchSuggestAuthority="com.example.MyCustomSuggestionProvider"

    android:searchSuggestIntentAction="android.intent.action.VIEW"

    android:searchSuggestSelection="word MATCH ?">

</searchable>

 

With this configuration, your query() method delivers the selection parameter as "word MATCH ?" and the selectionArgs parameter as the search query.

이 설정에서 query() 메서드는 "word MATCH?" selection 파라메타를 전달하고 검색쿼리로서 selectionArgs가 전달됩니다.

 

When you pass these to an SQLite query() method, as their respective arguments, they are synthesized together (the question mark is replaced with the query text).

SQLite query() 메서드로 이것을 전달할때에, 각각의 인자로, 그들은 함께 동기화(합성) 됩니다. (물음표 표시는 퀴리문장으로 대체 됩니다.)

 

If you chose to receive suggestion queries this way and need to add wildcards to the query text, append (and/or prefix) them to the selectionArgs parameter, because this value is wrapped in quotes and inserted in place of the question mark.

당신이 제안 쿼리들을 전달받기 위해 이방식을 선택하고 쿼리문장에 와일드카드를 추가하는 것이 필요하다면, selectionArgs 파라메타에 그것들을 추가(and/or prefix)하십시오. 왜냐하면 이 값은 따옴표로 둘러쌓여 물음표의 위치에 삽입되어 있기 때문입니다.

 

Another new attribute in the example above is android:searchSuggestIntentAction, which defines the intent action sent with each intent when the user selects a suggestion.

위의 예제 내에서의 또다른 새로운 속성은 사용자가 제안항목을 선택할때에 각 인텐트를 이용해 보내어질 인텐트 액션을 정의한 android:searchSuggestIntentAction 입니다.

 

It is discussed further in the section about Declaring an Intent for Suggestions.

이것은 "Declaring an Intent for Suggestions" 에 대한 섹션에 추가적인 설명이 있습니다.

 

Building a suggestion table

When you return suggestions to the system with a Cursor, the system expects specific columns in each row.

당신이 커서와 함께 시스템에 제안항목을 반환할때에, 시스템은 각 행에서 특정 열을 전달받기를 원합니다.

 

So, regardless of whether you decide to store your suggestion data in an SQLite database on the device, a database on a web server, or another format on the device or web, you must format the suggestions as rows in a table and present them with a Cursor.

그래서 당신이 장치상의 SQLite 데이터베이스 내부, 웹서버상의 데이터베이스 또는 장치나 웹상의 또다른 형식으로든 관계없이 반드시 테이블내의 행으로서의 제안항목의 형식을 지정해야 하며, 커서객체 형식으로 그것들을 제공합니다.

 

=============================================================

- 부가내용 -

Creating a Cursor without a table

테이블 없이 커서객체 생성하기

 

If your search suggestions are not stored in a table format (such as an SQLite table) using the columns required by the system, then you can search your suggestion data for matches and then format them into the necessary table on each request.

만약 당신의 검색제안항목들이 시스템으로부터 요구되는 열들로 구성된 (SQLite 테이블과 같은) 테이블 형식으로 저장되어 있지 않다면, 당신은 매치할 당신의 제안기능 데이터를 검색할 수 있으며 각 요청에서의 필수 테이블 내의 형식을 지정할 수 있습니다.

 

To do so, create a MatrixCursor using the required column names and then add a row for each suggestion using addRow(Object[]).

그렇게 하려면 필수 열이 지정된 Matrixcursor를 생성하고 addRow(Object[])를 이용하여 각 제안항목을 위한 행을 추가하십시오.

 

Return the final product from your Content Provider's query() method.

마지막으로 당신의 컨텐츠 프로바이더의 query() 메서드로부터의 결과를 리턴하십시오.

 

==============================================================================================================================================

 

The system understands several columns, but only two are required:

시스템은 몇몇 열들을 이해할 수 있지만, 딱 두가지 열은 필수항목입니다.

 

_ID

   A unique integer row ID for each suggestion. The system requires this in order to present suggestions in a ListView.

   각 제안항목을 위한 유니크한 integer 행 ID. 시스템은 리스트뷰에 제안항목들을 제공하기 위한 목적으로 이 열을 필수사항으로 여깁니다.

 

SUGGEST_COLUMN_TEXT_1

   The string that is presented as a suggestion.

   제안항목으로서 제공되어질 문자열

 

   The following columns are all optional (and most are discussed further in the following sections):

   이하의 열들은 모두 부가적인 항목입니다. (그리고 대부분은 다음의 섹션에서 부가설명되어 있습니다.)

 

SUGGEST_COLUMN_TEXT_2

   A string. If your Cursor includes this column, then all suggestions are provided in a two-line format.

   문자열입니다. 만약 당신의 커서가 이 열을 포함한다면, 모든 제안항목은 두줄의 형태로 제공됩니다.

 

   The string in this column is displayed as a second, smaller line of text below the primary suggestion text.

   두번째로서 보여지는 이 열의 문자열은 주 제안항목 문자열의 아랫줄에 작게 표시되는 항목입니다.

 

   It can be null or empty to indicate no secondary text.

   null 일수도 있고 부가적인 텍스트가 불필요하다면 비워두어도 됩니다.

 

SUGGEST_COLUMN_ICON_1

   A drawable resource, content, or file URI string.

   drawable 리소스, 컨텐츠 또는 파일의 URI 문자열입니다.

 

   If your Cursor includes this column, then all suggestions are provided in an icon-plus-text format with the drawable icon on the left side.

   당신의 커서가 이 열을 포함한다면, 모든 제안항목들은 좌측면에 drawable 아이콘이 보이는 형태로 아이콘과 텍스트가 결합되어 제공됩니다.

 

   This can be null or zero to indicate no icon in this row.

   이것은 널일수도 있고 이 행내의 아이콘이 불필요하다면 0을 넣을 수 있습니다.

 

SUGGEST_COLUMN_ICON_2

   A drawable resource, content, or file URI string.

   drawable 리소스, 컨텐츠 또는 파일의 URI 문자열 입니다. 

 

   If your Cursor includes this column, then all suggestions are provided in an icon-plus-text format with the icon on the right side.

   만약 당신의 커서가 이 열을 포함한다면, 모든 제안항목들은 우측면에 아이콘이 보이는 형태로 아이콘과 텍스트가 결합되어 제공됩니다.

 

   This can be null or zero to indicate no icon in this row.

   이것은 널일수도 있고 이 행내의 아이콘이 불필요하다면 0을 넣을 수 있습니다.

 

SUGGEST_COLUMN_INTENT_ACTION

   An intent action string.

   인텐트 액션 문자열 입니다.

 

   If this column exists and contains a value at the given row, the action defined here is used when forming the suggestion's intent.

   이 열이 존재하고 주어진 행에 이 값이 포함되어 있다면, 제안항목의 인텐트를 형성할때에 여기에 액션이 정의된 액션이 사용됩니다.

 

   If the element is not provided, the action is taken from the android:searchSuggestIntentAction field in your searchable configuration.

   이 항목이 제공되지 않는다면, 액션은 searchable 설정파일내의 android:searchSuggestIntentAction 필드로부터 얻어야 합니다.

 

   If your action is the same for all suggestions, it is more efficient to specify the action using android:searchSuggestIntentAction and omit this column.

   모든 제안항목을 위해 당신의 액션이 동일하다면, 그것은 android:searchSuggestIntentAction을 사용하여 액션을 지정하고 이 칼럼을 생략하는 것보다 효율적입니다.

 

SUGGEST_COLUMN_INTENT_DATA

   A data URI string.

   데이터 URI 문자열 입니다.

 

   If this column exists and contains a value at the given row, this is the data that is used when forming the suggestion's intent.

   이 열이 존재하고 주어진 행에 값이 포함되어 있다면, 이것은 제안항목들의 인텐트를 형성할때에 사용될 데이터 입니다.

 

   If the element is not provided, the data is taken from the android:searchSuggestIntentData field in your searchable configuration.

   이 항목이 제공되어지지 않는다면, 데이터는 searchable 설정파일내의 android:searchSuggestIntentData 필드로부터 얻어야 합니다.

 

   If neither source is provided, the intent's data field is null.

   소스또한 제공되어지지 않는다면, 인텐트의 데이터필드는 널입니다.

 

   If your data is the same for all suggestions, or can be described using a constant part and a specific ID, it is more efficient to specify it using android:searchSuggestIntentData and omit this column.

   모든 제안항목들을 위한 데이터가 동일하거나 상수나 특정 ID를 이용하여 설명되어진다면, android:searchSuggestIntentData를 사용하며 이 칼럼을 생략하는 것보다 효율적입니다.

 

SUGGEST_COLUMN_INTENT_DATA_ID

   A URI path string.

   URI 경로의 문자열 입니다.

 

   If this column exists and contains a value at the given row, then "/" and this value is appended to the data field in the intent.

   이 열이 존재하고 주어진 행에 값이 포함되어져 있다면, 인텐트 내의 데이터 필드에 "/"와 이 값이 추가되어 집니다.

 

   This should only be used if the data field specified by the android:searchSuggestIntentData attribute in the searchable configuration has already been set to an appropriate base string.

   searchable 설정파일내의 android:searchSuggestIntentData 속성에 의해 지정된 데이터 필드가 이미 적절한 기본 문자열로 설정된 경우에만 사용해야 합니다.

 

SUGGEST_COLUMN_INTENT_EXTRA_DATA

   Arbitrary data.

   임의의 데이터 입니다.

 

   If this column exists and contains a value at a given row, this is the extra data used when forming the suggestion's intent.

   이 열이 존재하고 주어진 행에 값이 포함되어 있다면, 이것은 제안항목의 인텐트를 형성할때에 사용되어질 여분의 데이터 항목입니다.

  

   If not provided, the intent's extra data field is null.

   만약 제공되어지지 않았다면, 인텐트츼 여분의 데이터 필드는 null 입니다.

 

   This column allows suggestions to provide additional data that is included as an extra in the intent's EXTRA_DATA_KEY key.

   이 열은 제안항목이  인텐트의 EXTRA_DATA_KEY키내의 여분으로서 부가적인 데이터를 제공하는 것을 허락합니다.

 

SUGGEST_COLUMN_QUERY

   If this column exists and this element exists at the given row, this is the data that is used when forming the suggestion's query, included as an extra in the intent's QUERY key.

   이 열이 존재하고 주어진 행에 이 항목이 존재한다면, 이것은 제안항목 쿼리를 형성할때에 사용되어질 인텐트의 QUERY 키내의 여분으로서 포함된 데이터 입니다.

 

   Required if suggestion's action is ACTION_SEARCH, optional otherwise.

   만일 제안항목의 액션이 ACTION_SEARCH 라면 필수항목이며, 그밖에는 부가항목입니다.

 

SUGGEST_COLUMN_SHORTCUT_ID

   Only used when providing suggestions for Quick Search Box.

   QSB를 위한 제안항목들이 제공되어지는 경우에만 사용됩니다.

 

   This column indicates whether a search suggestion should be stored as a shortcut and whether it should be validated.

   이 열은 검색 제안항목을 바로가기로서 저장해야 하는지 여부와 그것의 유효성을 검사할지 여부를 나타냅니다.

 

   Shortcuts are usually formed when the user clicks a suggestion from Quick Search Box.

   바로가기는 대게 사용자가 QSB내의 제안항목을 선택할때에 형성됩니다.

 

   If missing, the result is stored as a shortcut and never refreshed.

   없는 경우, 결과는 숏컷으로 저장되고 새로고침되지 않습니다.

 

   If set to SUGGEST_NEVER_MAKE_SHORTCUT, the result is not stored as a shortcut.

   SUGGEST_NEVER_MAKE_SHORTCUT로 설정되면, 결과는 숏컷형태로 저장되지 않습니다.

 

   Otherwise, the shortcut ID is used to check back for an up to date suggestion using SUGGEST_URI_PATH_SHORTCUT.

   그렇지 않으면, 숏컷  ID가 SUGGEST_URI_PATH_SHORTCUT을 사용하여 최신의 제안항목으로까지 다시 확인하는데 사용됩니다.

 

SUGGEST_COLUMN_SPINNER_WHILE_REFRESHING

   Only used when providing suggestions for Quick Search Box.

   오직 QSB를 위해 제안항목이 제공되어질때에 사용됩니다.

 

   This column specifies that a spinner should be shown instead of an icon from SUGGEST_COLUMN_ICON_2 while the shortcut of this suggestion is being refreshed in Quick Search Box.

   이 열은 QSB에서 제안항목의 바로가기가 새로고침 되는 동안 SUGGEST_COLUMN_ICON_2 부터의 아이콘 대신 출력되어질 스피너를 지정합니다.

 

Some of these columns are discussed more in the following sections.

이러한 열들의 일부에 대한 자세한 설명은 다음의 섹션에서 다루어집니다.