freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

應(yīng)用程序基礎(chǔ)外文翻譯-其他專(zhuān)業(yè)(參考版)

2025-01-23 11:09本頁(yè)面
  

【正文】 s created and registered in code, the intent filter is instantiated directly as an IntentFilter object. All other filters are set up in the manifest. For more on intent filters, see a separate document, Intents and Intent Filters. 。re declared in the manifest file. A ponent can have any number of intent filters, each one declaring a different set of capabilities. If it doesn39。s ponents. For example, an activity might be declared as follows: The other ponents are declared in a similar way — service elements for services, receiver elements for broadcast receivers, and provider elements for content providers. Activities, services, and content providers that are not declared in the manifest are not visible to the system and are consequently never run. However, broadcast receivers can either be declared in the manifest, or they can be created dynamically in code (as BroadcastReceiver objects) and registered with the system by calling (). For more on how to structure a manifest file for your application, see The Android File. Intent filters An Intent object can explicitly name a target ponent. If it does, Android finds that ponent (based on the declarations in the manifest file) and activates it. But if a target is not explicitly named, Android must locate the best ponent to respond to the intent. It does so by paring the Intent object to the intent filters of potential targets. A ponent39。s code, files, and resources. The manifest is a structured XML file and is always named for all applications. It does a number of things in addition to declaring the application39。re in a longrunning conversation with the user and may remain active, even when idle, as long as the conversation continues. Similarly, services may also remain running for a long time. So Android has methods to shut down activities and services in an orderly way: 1. An activity can be shut down by calling its finish() method. One activity can shut down another activity (one it started with startActivityForResult()) by calling finishActivity(). 2. A service can be stopped by calling its stopSelf() method, or by calling (). Components might also be shut down by the system when they are no longer being 11 used or when Android must reclaim memory for more active ponents. A later section, Component Lifecycles, discusses this possibility and its ramifications in more detail. The manifest file Before Android can start an application ponent, it must learn that the ponent exists. Therefore, applications declare their ponents in a manifest file that39。s responding to a broadcast message. So there39。s onStart() method and passes it the Intent object. Similarly, an intent can be passed to () to establish an ongoing connection between the calling ponent and a target service. The service receives the Intent object in an onBind() call. (If the service is not already running, bindService() can optionally start it.) For example, an activity might establish a connection with the music playback service mentioned earlier so that it can provide the user with the means (a user interface) for controlling the playback. The activity would call bindService() to set up that connection, and then call methods defined by the service to affect the playback. A later section, Remote procedure calls, has more details about binding to a service. 3. An application can initiate a broadcast by passing an Intent object to methods like (), (), and () in any of their variations. Android delivers the intent to all interested broadcast receivers by calling their onReceive() methods. For more on intent messages, see the separate article, Intents and Intent Filters. Shutting down ponents A content provider is active only while it39。s passed to the calling activity39。s onNewIntent() method to pass it any subsequent intents. One activity often starts the next one. If it expects a result back from the activity it39。s a request that should be handled by a particular ponent, Android makes sure that the application process of the ponent is running, starting it if necessary, and that an appropriate instance of the ponent is available, creating the instance if necessary. Activating ponents: intents Content providers are activated when they39。 it cooperates with the provider to manage any interprocess munication that39。s attention i
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1