1 page.title= 2 @jd:body 3 4 <div id="qv-wrapper"> 5 <div id="qv"> 6 7 <h2> </h2> 8 <ol> 9 <li><a href="#filestruct"> </a></li> 10 <li><a href="#filec"> </a> 11 <li><a href="#filef"> </a> 12 <ol> 13 <li><a href="#ifs"> </a></li> 14 <li><a href="#iconlabel"> </a></li> 15 <li><a href="#perms"></a></li> 16 <li><a href="#libs"></a></li> 17 </ol></li> 18 </ol> 19 </div> 20 </div> 21 22 <p> 23 AndroidManifest.xml ( 24 ) . <span itemprop="description"> 25 Android . 26 27 .</span> , . 28 </p> 29 30 <ul> 31 <li> Java . 32 .</li> 33 34 <li> . , 35 , 36 . 37 ( {@link android.content.Intent 38 Intent} ). Android 39 , .</li> 40 41 <li> .</li> 42 43 <li>API 44 .</li> 45 46 <li>, 47 .</li> 48 49 <li> 50 {@link android.app.Instrumentation} . 51 . 52 .</li> 53 54 <li> Android API 55 .</li> 56 57 <li> .</li> 58 </ul> 59 60 61 <h2 id="filestruct"> </h2> 62 63 <p> 64 65 . 66 . 67 . 68 ( ) 69 . 70 </p> 71 72 <pre> 73 <?xml version="1.0" encoding="utf-8"?> 74 75 <a href="{@docRoot}guide/topics/manifest/manifest-element.html"><manifest></a> 76 77 <a href="{@docRoot}guide/topics/manifest/uses-permission-element.html"><uses-permission /></a> 78 <a href="{@docRoot}guide/topics/manifest/permission-element.html"><permission /></a> 79 <a href="{@docRoot}guide/topics/manifest/permission-tree-element.html"><permission-tree /></a> 80 <a href="{@docRoot}guide/topics/manifest/permission-group-element.html"><permission-group /></a> 81 <a href="{@docRoot}guide/topics/manifest/instrumentation-element.html"><instrumentation /></a> 82 <a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><uses-sdk /></a> 83 <a href="{@docRoot}guide/topics/manifest/uses-configuration-element.html"><uses-configuration /></a> <!-- ##api level 3## --> 84 <a href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><uses-feature /></a> <!-- ##api level 4## --> 85 <a href="{@docRoot}guide/topics/manifest/supports-screens-element.html"><supports-screens /></a> <!-- ##api level 4## --> 86 <a href="{@docRoot}guide/topics/manifest/compatible-screens-element.html"><compatible-screens /></a> <!-- ##api level 9## --> 87 <a href="{@docRoot}guide/topics/manifest/supports-gl-texture-element.html"><supports-gl-texture /></a> <!-- ##api level 11## --> 88 89 <a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a> 90 91 <a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a> 92 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"><intent-filter></a> 93 <a href="{@docRoot}guide/topics/manifest/action-element.html"><action /></a> 94 <a href="{@docRoot}guide/topics/manifest/category-element.html"><category /></a> 95 <a href="{@docRoot}guide/topics/manifest/data-element.html"><data /></a> 96 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"></intent-filter></a> 97 <a href="{@docRoot}guide/topics/manifest/meta-data-element.html"><meta-data /></a> 98 <a href="{@docRoot}guide/topics/manifest/activity-element.html"></activity></a> 99 100 <a href="{@docRoot}guide/topics/manifest/activity-alias-element.html"><activity-alias></a> 101 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"><intent-filter></a> . . . <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"></intent-filter></a> 102 <a href="{@docRoot}guide/topics/manifest/meta-data-element.html"><meta-data /></a> 103 <a href="{@docRoot}guide/topics/manifest/activity-alias-element.html"></activity-alias></a> 104 105 <a href="{@docRoot}guide/topics/manifest/service-element.html"><service></a> 106 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"><intent-filter></a> . . . <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"></intent-filter></a> 107 <a href="{@docRoot}guide/topics/manifest/meta-data-element.html"><meta-data/></a> 108 <a href="{@docRoot}guide/topics/manifest/service-element.html"></service></a> 109 110 <a href="{@docRoot}guide/topics/manifest/receiver-element.html"><receiver></a> 111 <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"><intent-filter></a> . . . <a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"></intent-filter></a> 112 <a href="{@docRoot}guide/topics/manifest/meta-data-element.html"><meta-data /></a> 113 <a href="{@docRoot}guide/topics/manifest/receiver-element.html"></receiver></a> 114 115 <a href="{@docRoot}guide/topics/manifest/provider-element.html"><provider></a> 116 <a href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html"><grant-uri-permission /></a> 117 <a href="{@docRoot}guide/topics/manifest/meta-data-element.html"><meta-data /></a> 118 <a href="{@docRoot}guide/topics/manifest/path-permission-element.html"><path-permission /></a> 119 <a href="{@docRoot}guide/topics/manifest/provider-element.html"></provider></a> 120 121 <a href="{@docRoot}guide/topics/manifest/uses-library-element.html"><uses-library /></a> 122 123 <a href="{@docRoot}guide/topics/manifest/application-element.html"></application></a> 124 125 <a href="{@docRoot}guide/topics/manifest/manifest-element.html"></manifest></a> 126 </pre> 127 128 <p> 129 130 . . 131 . 132 </p> 133 134 <p style="margin-left: 2em"> 135 <code><a href="{@docRoot}guide/topics/manifest/action-element.html"><action></a></code> 136 <br/><code><a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a></code> 137 <br/><code><a href="{@docRoot}guide/topics/manifest/activity-alias-element.html"><activity-alias></a></code> 138 <br/><code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> 139 <br/><code><a href="{@docRoot}guide/topics/manifest/category-element.html"><category></a></code> 140 <br/><code><a href="{@docRoot}guide/topics/manifest/data-element.html"><data></a></code> 141 <br/><code><a href="{@docRoot}guide/topics/manifest/grant-uri-permission-element.html"><grant-uri-permission></a></code> 142 <br/><code><a href="{@docRoot}guide/topics/manifest/instrumentation-element.html"><instrumentation></a></code> 143 <br/><code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"><intent-filter></a></code> 144 <br/><code><a href="{@docRoot}guide/topics/manifest/manifest-element.html"><manifest></a></code> 145 <br/><code><a href="{@docRoot}guide/topics/manifest/meta-data-element.html"><meta-data></a></code> 146 <br/><code><a href="{@docRoot}guide/topics/manifest/permission-element.html"><permission></a></code> 147 <br/><code><a href="{@docRoot}guide/topics/manifest/permission-group-element.html"><permission-group></a></code> 148 <br/><code><a href="{@docRoot}guide/topics/manifest/permission-tree-element.html"><permission-tree></a></code> 149 <br/><code><a href="{@docRoot}guide/topics/manifest/provider-element.html"><provider></a></code> 150 <br/><code><a href="{@docRoot}guide/topics/manifest/receiver-element.html"><receiver></a></code> 151 <br/><code><a href="{@docRoot}guide/topics/manifest/service-element.html"><service></a></code> 152 <br/><code><a href="{@docRoot}guide/topics/manifest/supports-screens-element.html"><supports-screens></a></code> <!-- ##api level 4## --> 153 <br/><code><a href="{@docRoot}guide/topics/manifest/uses-configuration-element.html"><uses-configuration></a></code> <!-- ##api level 3## --> 154 <br/><code><a href="{@docRoot}guide/topics/manifest/uses-feature-element.html"><uses-feature></a></code> <!-- ##api level 4## --> 155 <br/><code><a href="{@docRoot}guide/topics/manifest/uses-library-element.html"><uses-library></a></code> 156 <br/><code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html"><uses-permission></a></code> 157 <br/><code><a href="{@docRoot}guide/topics/manifest/uses-sdk-element.html"><uses-sdk></a></code> 158 </p> 159 160 161 162 163 <h2 id="filec"> </h2> 164 165 <p> 166 167 . 168 </p> 169 170 <dl> 171 <dt><b></b></dt> 172 <dd> 173 <code><a href="{@docRoot}guide/topics/manifest/manifest-element.html"><manifest></a></code> 174 <code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> , 175 . 176 . , 177 178 . 179 180 <p> 181 . 182 . 183 </p> 184 185 <p> 186 . 187 <code><a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a></code>, 188 <code><a href="{@docRoot}guide/topics/manifest/provider-element.html"><provider></a></code> 189 <code><a href="{@docRoot}guide/topics/manifest/service-element.html"><service></a></code> 190 ( 191 <code><a href="{@docRoot}guide/topics/manifest/activity-alias-element.html"><activity-alias></a></code> 192 . 193 <code><a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a></code> 194 ). 195 </p></dd> 196 197 <dt><b></b></dt> 198 <dd> . , 199 . 200 . , 201 . 202 203 <p> 204 <code><a href="{@docRoot}guide/topics/manifest/manifest-element.html"><manifest></a></code> 205 {@code android:alwaysRetainTaskState} . 206 , {@code android:} . 207 208 .</p></dd> 209 210 <dt><b> </b></dt> 211 <dd> Java . 212 ( 213 <code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> 214 ), . , 215 (<code><a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a></code>), 216 217 (<code><a href="{@docRoot}guide/topics/manifest/service-element.html"><service></a></code>), 218 219 (<code><a href="{@docRoot}guide/topics/manifest/receiver-element.html"><receiver></a></code>) 220 221 (<code><a href="{@docRoot}guide/topics/manifest/provider-element.html"><provider></a></code>) . 222 223 <p> 224 225 ({@link android.app.Activity}, {@link android.app.Service}, 226 {@link android.content.BroadcastReceiver} {@link android.content.ContentProvider}) , 227 {@code name} . 228 . 229 , {@link android.app.Service} . 230 </p> 231 232 <pre><manifest . . . > 233 <application . . . > 234 <service android:name="com.example.project.SecretService" . . . > 235 . . . 236 </service> 237 . . . 238 </application> 239 </manifest></pre> 240 241 <p> 242 , 243 ( 244 <code><a href="{@docRoot}guide/topics/manifest/manifest-element.html"><manifest></a></code> 245 246 <code><a href="{@docRoot}guide/topics/manifest/manifest-element.html#package">package</a></code> 247 ). . 248 </p> 249 250 <pre><manifest package="com.example.project" . . . > 251 <application . . . > 252 <service android:name=".SecretService" . . . > 253 . . . 254 </service> 255 . . . 256 </application> 257 </manifest></pre> 258 259 <p> 260 Android . 261 , . 262 </p></dd> 263 264 <dt><b> </b></dt> 265 <dd> , 266 . 267 . 268 269 <pre><intent-filter . . . > 270 <action android:name="android.intent.action.EDIT" /> 271 <action android:name="android.intent.action.INSERT" /> 272 <action android:name="android.intent.action.DELETE" /> 273 . . . 274 </intent-filter></pre></dd> 275 276 <dt><b> </b></dt> 277 <dd> . 278 . 279 . 280 .</p> 281 282 <p style="margin-left: 2em">{@code @[<i></i>:]<i></i>:<i></i>}</p> 283 284 <p> 285 <i></i> , 286 <i></i> "" " " . 287 <i></i> . 288 : 289 </p> 290 291 <pre><activity android:icon="@drawable/smallPic" . . . ></pre> 292 293 <p> 294 , '{@code ?}' 295 ('{@code @}' ). 296 </p> 297 298 <p style="margin-left: 2em">{@code ?[<i></i>:]<i></i>:<i></i>} 299 </p></dd> 300 301 <dt><b> </b></dt> 302 <dd> , ('{@code \\}') 303 . {@code \\n}, 304 '{@code \\uxxxx}' .</dd> 305 </dl> 306 307 308 <h2 id="filef"> </h2> 309 310 <p> 311 Android 312 . 313 </p> 314 315 316 <h3 id="ifs"> </h3> 317 318 <p> 319 (, 320 ) <i></i>. 321 ({@link android.content.Intent} ). 322 , 323 . 324 Android 325 , 326 . 327 </p> 328 329 <p> 330 . , 331 . <i> </i>. Android 332 , 333 334 <code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"><intent-filter></a></code> 335 . , 336 . 337 </p> 338 339 <p> 340 . 341 . 342 343 . 344 </p> 345 346 <p> 347 348 349 <a href="{@docRoot}guide/components/intents-filters.html"> 350 </a> . 351 </p> 352 353 354 <h3 id="iconlabel"> </h3> 355 356 <p> 357 {@code icon} {@code label} 358 . 359 {@code description} , 360 . 361 <code><a href="{@docRoot}guide/topics/manifest/permission-element.html"><permission></a></code> 362 363 , 364 365 . 366 </p> 367 368 <p> 369 , 370 {@code icon} {@code label} . 371 372 <code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> 373 . 374 , — 375 <code><a href="{@docRoot}guide/topics/manifest/activity-element.html"><activity></a></code> 376 — 377 <code><a href="{@docRoot}guide/topics/manifest/intent-filter-element.html"><intent-filter></a></code> 378 . 379 <code><a href="{@docRoot}guide/topics/manifest/application-element.html"><application></a></code> 380 , 381 382 . 383 </p> 384 385 <p> 386 387 , 388 . 389 "{@code android.intent.action.MAIN}" 390 "{@code android.intent.category.LAUNCHER}" 391 . , 392 . 393 . 394 </p> 395 396 397 <h3 id="perms"></h3> 398 399 <p> 400 <i></i> 401 . 402 . 403 </p> 404 405 <p> 406 . 407 . Android 408 . 409 </p> 410 411 <p style="margin-left: 2em">{@code android.permission.CALL_EMERGENCY_NUMBERS} 412 <br/>{@code android.permission.READ_OWNER_DATA} 413 <br/>{@code android.permission.SET_WALLPAPER} 414 <br/>{@code android.permission.DEVICE_POWER}</p> 415 416 <p> 417 . 418 </p> 419 420 <p> 421 , 422 423 <code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html"><uses-permission></a></code> 424 . , 425 . 426 427 . 428 429 . , 430 . 431 </p> 432 433 <p> 434 (, , 435 ) . Android 436 ( 437 {@link android.Manifest.permission android.Manifest.permission} ), 438 . . 439 440 <code><a href="{@docRoot}guide/topics/manifest/permission-element.html"><permission></a></code> 441 . . 442 </p> 443 444 <pre> 445 <manifest . . . > 446 <permission android:name="com.example.project.DEBIT_ACCT" . . . /> 447 <uses-permission android:name="com.example.project.DEBIT_ACCT" /> 448 . . . 449 <application . . .> 450 <activity android:name="com.example.project.FreneticActivity" 451 android:permission="com.example.project.DEBIT_ACCT" 452 . . . > 453 . . . 454 </activity> 455 </application> 456 </manifest> 457 </pre> 458 459 <p> 460 {@code DEBIT_ACCT} 461 462 <code><a href="{@docRoot}guide/topics/manifest/permission-element.html"><permission></a></code> 463 , 464 <code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html"><uses-permission></a></code> 465 . 466 . 467 . 468 </p> 469 470 <p> 471 , {@code permission} 472 473 (: {@code android.permission.CALL_EMERGENCY_NUMBERS}), 474 475 <code><a href="{@docRoot}guide/topics/manifest/permission-element.html"><permission></a></code> 476 . 477 <code><a href="{@docRoot}guide/topics/manifest/uses-permission-element.html"><uses-permission></a></code> . 478 </p> 479 480 <p> 481 482 <code><a href="{@docRoot}guide/topics/manifest/permission-tree-element.html"><permission-tree></a></code> 483 484 . 485 <code><a href="{@docRoot}guide/topics/manifest/permission-group-element.html"><permission-group></a></code> 486 ( 487 <code><a href="{@docRoot}guide/topics/manifest/permission-element.html"><permission></a></code> 488 ). 489 . 490 <code><a href="{@docRoot}guide/topics/manifest/permission-group-element.html"><permission-group></a></code> 491 , 492 . 493 494 <code><a href="{@docRoot}guide/topics/manifest/permission-element.html"><permission></a></code> 495 496 <code><a href="{@docRoot}guide/topics/manifest/permission-element.html#pgroup">permissionGroup</a></code> 497 . 498 </p> 499 500 501 <h3 id="libs"></h3> 502 503 <p> 504 Android . 505 (, , 506 , , , , ContentProvider ) 507 . 508 </p> 509 510 <p> 511 . 512 , 513 . 514 <code><a href="{@docRoot}guide/topics/manifest/uses-library-element.html"><uses-library></a></code> 515 ( 516 ). 517 </p> 518