1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2007 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17<!-- Declare the contents of this Android application.  The namespace
18     attribute brings in the Android platform namespace, and the package
19     supplies a unique name for the application.  When writing your
20     own application, the package name must be changed from "com.example.*"
21     to come from a domain that you own or have control over. -->
22<manifest xmlns:android="http://schemas.android.com/apk/res/android"
23    package="com.example.android.notepad" >
24
25    <uses-sdk android:minSdkVersion="11" />
26
27    <application android:icon="@drawable/app_notes"
28        android:label="@string/app_name"
29    >
30        <provider android:name="NotePadProvider"
31            android:authorities="com.google.provider.NotePad"
32            android:exported="false">
33            <grant-uri-permission android:pathPattern=".*" />
34        </provider>
35
36        <activity android:name="NotesList" android:label="@string/title_notes_list">
37            <intent-filter>
38                <action android:name="android.intent.action.MAIN" />
39                <category android:name="android.intent.category.LAUNCHER" />
40            </intent-filter>
41            <intent-filter>
42                <action android:name="android.intent.action.VIEW" />
43                <action android:name="android.intent.action.EDIT" />
44                <action android:name="android.intent.action.PICK" />
45                <category android:name="android.intent.category.DEFAULT" />
46                <data android:mimeType="vnd.android.cursor.dir/vnd.google.note" />
47            </intent-filter>
48            <intent-filter>
49                <action android:name="android.intent.action.GET_CONTENT" />
50                <category android:name="android.intent.category.DEFAULT" />
51                <data android:mimeType="vnd.android.cursor.item/vnd.google.note" />
52            </intent-filter>
53        </activity>
54
55        <activity android:name="NoteEditor"
56            android:theme="@android:style/Theme.Holo.Light"
57            android:screenOrientation="sensor"
58            android:configChanges="keyboardHidden|orientation"
59        >
60            <!-- This filter says that we can view or edit the data of
61                 a single note -->
62            <intent-filter android:label="@string/resolve_edit">
63                <action android:name="android.intent.action.VIEW" />
64                <action android:name="android.intent.action.EDIT" />
65                <action android:name="com.android.notepad.action.EDIT_NOTE" />
66                <category android:name="android.intent.category.DEFAULT" />
67                <data android:mimeType="vnd.android.cursor.item/vnd.google.note" />
68            </intent-filter>
69
70            <!-- This filter says that we can create a new note inside
71                 of a directory of notes.  The INSERT action creates an
72                 empty note; the PASTE action initializes a new note from
73                 the current contents of the clipboard. -->
74            <intent-filter>
75                <action android:name="android.intent.action.INSERT" />
76                <action android:name="android.intent.action.PASTE" />
77                <category android:name="android.intent.category.DEFAULT" />
78                <data android:mimeType="vnd.android.cursor.dir/vnd.google.note" />
79            </intent-filter>
80
81        </activity>
82
83        <activity android:name="TitleEditor"
84            android:label="@string/title_edit_title"
85            android:icon="@drawable/ic_menu_edit"
86            android:theme="@android:style/Theme.Holo.Dialog"
87            android:windowSoftInputMode="stateVisible">
88            <!-- This activity implements an alternative action that can be
89                 performed on notes: editing their title.  It can be used as
90                 a default operation if the user invokes this action, and is
91                 available as an alternative action for any note data. -->
92            <intent-filter android:label="@string/resolve_title">
93                <!-- This is the action we perform.  It is a custom action we
94                     define for our application, not a generic VIEW or EDIT
95                     action since we are not a general note viewer/editor. -->
96                <action android:name="com.android.notepad.action.EDIT_TITLE" />
97                <!-- DEFAULT: execute if being directly invoked. -->
98                <category android:name="android.intent.category.DEFAULT" />
99                <!-- ALTERNATIVE: show as an alternative action when the user is
100                     working with this type of data. -->
101                <category android:name="android.intent.category.ALTERNATIVE" />
102                <!-- SELECTED_ALTERNATIVE: show as an alternative action the user
103                     can perform when selecting this type of data. -->
104                <category android:name="android.intent.category.SELECTED_ALTERNATIVE" />
105                <!-- This is the data type we operate on. -->
106                <data android:mimeType="vnd.android.cursor.item/vnd.google.note" />
107            </intent-filter>
108        </activity>
109
110    </application>
111
112</manifest>
113