1<?xml version="1.0" encoding="UTF-8"?> 2<!-- 3 Copyright 2014 The Android Open Source Project 4 5 Licensed under the Apache License, Version 2.0 (the "License"); 6 you may not use this file except in compliance with the License. 7 You may obtain a copy of the License at 8 9 http://www.apache.org/licenses/LICENSE-2.0 10 11 Unless required by applicable law or agreed to in writing, software 12 distributed under the License is distributed on an "AS IS" BASIS, 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 See the License for the specific language governing permissions and 15 limitations under the License. 16--> 17 18<sample> 19 <name>DocumentCentricRecents</name> 20 <group>UI</group> 21 <package>com.example.android.documentcentricapps</package> 22 23 <!-- change minSdk if needed--> 24 <minSdk>21</minSdk> 25 26 <strings> 27 <intro> 28 <![CDATA[ 29 This sample shows the basic usage of the new \"Document Centric Apps\" API. 30 It let\'s you create new documents in the system overview menu and persists its 31 state through reboots. If \"Task per document\" is checked a new task will be 32 created for every new document in the overview menu. 33 ]]> 34 </intro> 35 </strings> 36 37 <template src="base"/> 38 39<metadata> 40 <status>PUBLISHED</status> 41 <categories>UI</categories> 42 <technologies>Android</technologies> 43 <languages>Java</languages> 44 <solutions>Mobile</solutions> 45 <level>INTERMEDIATE</level> 46 <icon>screenshots/big_icon.png</icon> 47 <screenshots> 48 <img>screenshots/1-activity.png</img> 49 <img>screenshots/2-overview.png</img> 50 </screenshots> 51 <api_refs> 52 <android>android.app.Activity</android> 53 <android>android.content.Intent.FLAG_ACTIVITY_NEW_DOCUMENT</android> 54 </api_refs> 55 <description> 56<![CDATA[ 57Sample demonstrating the basic usage of the new 'Document Centric Apps' API. 58It let's you create new documents in the system overview menu and persists its 59state through reboots. 60]]> 61 </description> 62 <intro> 63<![CDATA[ 64This sample shows the basic usage of the new Document-Centric Apps API. The new 65API modifies the meaning of the Intent#FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET flag, which is 66now deprecated. In versions before L it serves to define a boundary between the main task and a 67subtask. The subtask holds a different thumbnail and all activities in it are finished when the 68task is reset. In L this flag causes a full break with the task that launched it. As such it has 69been renamed to Intent#FLAG_ACTIVITY_NEW_DOCUMENT. 70 71This sample mainly uses Intent flags in code. But Activities can also specify in their manifests 72that they shall always be launched into a new task in the above manner using the new activity 73attribute documentLaunchMode which may take on one of three values, “intoExisting” equivalent to 74NEW_DOCUMENT, “always” equivalent to NEW_DOCUMENT | MULTIPLE_TASK, “none” the default, and 75“never” which will negate the effect of any attempt to launch the activity with NEW_DOCUMENT. 76]]> 77 </intro> 78</metadata> 79</sample> 80