Karteikarten
Android - Code
Karten in diesem Stapel (2)
- 1intent意圖和意圖篩選器
本文件內容
意圖類型建置意圖明確意圖範例隱含意圖範例強制顯示應用程式選擇器接收隱含意圖篩選器範例使用待處理意圖意圖解析動作測試類別測試資料測試意圖比對
另請參閱
與其他應用程式互動分享內容
Intent 是可用來向另一個應用程式元件要求動作的傳訊物件。 雖然意圖有幾種方式可加速元件間的通訊,但共有三種基本使用案例:
如何啟動 Activity:
Activity 代表應用程式中的單一畫面。您可以將 Intent 傳送至 startActivity() 來啟動Activity 的新執行個體。 Intent 可描述要啟動的 Activity 並攜帶任何必要資料。
如果您想要在 Activity 完成時收到結果, 請呼叫 startActivityForResult()。Activity 的onActivityResult()回呼中的個別 Intent物件,就是 Activity 收到的結果。 如需詳細資訊,請參閱 Activity 指南。
如何啟動服務:
Service 是可以在背景中執行操作的元件,但沒有使用者介面。 您可以將 Intent 傳送至startService() 來啟動服務以執行一次性操作 (例如下載檔案)。 Intent 可描述要啟動的服務並攜帶任何必要資料。
如果服務是採用主從介面設計,您可以將 Intent 傳送至 bindService() 來繫結至另一個元件的服務。 如需詳細資訊,請參閱服務指南。
如何傳送廣播:
廣播是指任何應用程式都可接收的訊息。系統會傳送各種系統事件廣播,例如系統開機或裝置開始充電。 您可以將 Intent 傳送至 sendBroadcast()、sendOrderedBroadcast(Intent, String) 或sendStickyBroadcast(),以向其他應用程式傳送廣播. - 2releasePrepare for Release
Quickview
Learn which resources you'll need to release your app.Find out how to configure and build your app for release.Learn best practices for releasing your app.
In this document
IntroductionGathering Materials and ResourcesConfiguring Your ApplicationBuilding Your ApplicationPreparing External Servers and ResourcesTesting Your Application for Release
See also
Publishing OverviewSigning Your ApplicationsLaunch Checklist for Google Play
Before you distribute your Android application to users you need to prepare it for release. The preparation process is a required development task for all Android applications and is the first step in the publishing process (see figure 1).
When you prepare your application for release, you configure, build, and test a release version of your application. The configuration tasks are straightforward, involving basic code cleanup and code modification tasks that help optimize your application.
Informationen
- Beschreibung
- Karteikarten am Android - Code, erstellt von Edmond Li8636 am 18/10/2016.
- Erstellt von
- Edmond Li8636
- Aufrufe
- 7
- Tags
- Bewertung