Context 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
介面連接全域應用程式環境資訊。
[Android.Runtime.Register("android/content/Context", DoNotGenerateAcw=true)]
public abstract class Context : Java.Lang.Object
[<Android.Runtime.Register("android/content/Context", DoNotGenerateAcw=true)>]
type Context = class
inherit Object
- 繼承
- 衍生
- 屬性
備註
介面連接全域應用程式環境資訊。 這是一個抽象類別,其實作由 Android 系統提供。 它允許存取特定應用程式的資源與類別,以及應用程式層級操作的上啟呼叫,例如啟動活動、廣播與接收意圖等。
Java 文件 android.content.Context。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
建構函式
| 名稱 | Description |
|---|---|
| Context() | |
| Context(IntPtr, JniHandleOwnership) |
用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。 |
欄位
| 名稱 | Description |
|---|---|
| AccessibilityService |
使用 with |
| AccountService |
使用 with |
| ActivityService |
使用 來 |
| AdvancedProtectionService |
使用 以 |
| AlarmService |
使用 with |
| AppFunctionService |
用 來 |
| AppInteractionService |
用 with |
| AppOpsService |
使用 with |
| AppSearchService |
用 來 |
| AppwidgetService |
使用 with |
| AudioService |
使用來 |
| AuthenticationPolicyService |
使用 以 |
| AutofillService |
使用 以 |
| BatteryService |
用 來 |
| BindAllowActivityStarts |
已淘汰.
標記 |
| BindExternalServiceLong |
其運作方式與 相同 |
| BindNotPerceptible |
已淘汰.
標記: |
| BindPackageIsolatedProcess |
已淘汰.
標記 |
| BindSharedIsolatedProcess |
已淘汰.
標記為 |
| BiometricService |
用 with |
| BlobStoreService |
使用 with |
| BluetoothService |
用 來 |
| BugreportService |
服務用來擷取錯誤報告。 |
| CameraService |
用 來 |
| CaptioningService |
使用 with |
| CarrierConfigService |
使用 來 |
| ChooserService |
使用 with |
| ClipboardService |
使用 with |
| CompanionDeviceService |
使用 with |
| ConnectivityDiagnosticsService |
使用來 |
| ConnectivityService |
使用 with |
| ConsumerIrService |
使用時 |
| ContactKeysService |
使用來 |
| ContentRestrictionService |
使用 with |
| CredentialService |
使用 with |
| CrossProfileAppsService |
使用 with |
| DeviceIdDefault |
預設裝置 ID,即主要(非虛擬)裝置的 ID。 |
| DeviceIdInvalid |
裝置 ID 無效。 |
| DeviceLockService |
使用 with |
| DevicePolicyService |
使用 with |
| DisplayHashService |
使用 to |
| DisplayService |
使用 with |
| DomainVerificationService |
使用 to |
| DownloadService |
使用 with |
| DropboxService |
用 來 |
| EuiccService |
用 來 |
| FileIntegrityService |
使用 以 |
| FileService |
使用 with |
| FingerprintService |
使用來 |
| GameService |
使用 with |
| GrammaticalInflectionService |
使用 with |
| HardwarePropertiesService |
使用 with |
| HealthconnectService |
使用 with |
| HidService |
使用 with |
| InputMethodService |
使用 with |
| InputService |
使用 來 |
| IpsecService |
使用 with |
| JobSchedulerService |
用 with |
| KeychainService |
使用 with |
| KeyguardService |
用 來 |
| KeystoreService |
使用 with |
| LauncherAppsService |
使用 with |
| LayoutInflaterService |
在此語境下,使用 with |
| LocaleService |
使用 with |
| LocationService |
使用 with |
| MediaCommunicationService |
使用 來 |
| MediaMetricsService |
使用 with |
| MediaProjectionService |
使用 with |
| MediaQualityService |
使用 with |
| MediaRouterService |
使用 with |
| MediaSessionService |
使用 with |
| MemoryBudgetService |
用 來 |
| MidiService |
使用 with |
| MultisensoryManagerService |
用來 |
| NetworkStatsService |
用 來 |
| NfcService |
使用 with |
| NotificationService |
使用 with |
| NpuService |
使用 with |
| NsdService |
使用 with |
| OverlayService |
用 來 |
| PccSandboxService |
使用 with |
| PeopleService |
使用 with |
| PerformanceHintService |
使用 來 |
| PersistentDataBlockService |
用 來 |
| PowerService |
用 來 |
| PrintService |
|
| ProfilingService |
使用 以 |
| ReceiverExported |
已淘汰.
標記: |
| ReceiverNotExported |
已淘汰.
標記 |
| ReceiverVisibleToInstantApps |
已淘汰.
標記: |
| RestrictionsService |
使用 with |
| RoleService |
使用 with |
| SatelliteService |
使用 with |
| SearchService |
使用 with |
| SecurityStateService |
使用 with |
| SensorService |
用 來 |
| SerialService |
用 來 |
| ShortcutService |
用 with |
| StatusBarService |
用 來 |
| StorageService |
使用 來 |
| StorageStatsService |
使用 with |
| SystemHealthService |
用 來 |
| TelecomService |
使用 with |
| TelephonyImsService |
使用 以 |
| TelephonyPhoneNumberService |
使用 with |
| TelephonyService |
使用 來 |
| TelephonySubscriptionService |
使用 with |
| TetheringService |
使用 with |
| TextClassificationService |
使用 with |
| TextServicesManagerService |
使用 with |
| TimeManagerService |
使用 with |
| TvAdService |
使用 with |
| TvInputService |
用 來 |
| TvInteractiveAppService |
使用 with |
| UiModeService |
用 來 |
| UsageStatsService |
用 來 |
| UsbService |
用 來 |
| UserService |
使用 with |
| VibratorManagerService |
使用來 |
| VibratorService |
使用來 |
| VirtualDeviceService |
使用 with |
| VpnManagementService |
使用 with |
| WallpaperService |
用 with |
| WebAppService |
使用 with |
| WifiAwareService |
使用 with |
| WifiP2pService |
使用 with |
| WifiRttRangingService |
用 with |
| WifiService |
使用 with |
| WindowService |
使用 with |
屬性
| 名稱 | Description |
|---|---|
| ApplicationContext |
回傳目前程序單一全域應用程式物件的上下文。 |
| ApplicationInfo |
請回傳本情境套件的完整應用程式資訊。 |
| Assets |
回傳一個 AssetManager 實例,針對你的應用程式套件。 |
| AttributionSource |
取得與此情境相關的歸屬來源。 |
| AttributionTag |
歸因可以在複雜的應用程式中用來邏輯地區分應用程式的各個部分。 |
| CacheDir |
回傳檔案系統中應用程式專屬快取目錄的絕對路徑。 |
| Class |
回傳此 |
| ClassLoader |
回傳一個你可以用來擷取這個套件裡的類別載入器。 |
| CodeCacheDir |
回傳用於儲存快取程式碼的檔案系統中應用程式專屬快取目錄的絕對路徑。 |
| ContentResolver |
回傳一個 ContentResolver 實例,針對你的應用程式套件。 |
| DataDir |
回傳檔案系統中存放所有屬於此應用程式的私有檔案的目錄的絕對路徑。 應用程式不應直接使用此路徑;他們應該改用 getFilesDir() 、getCacheDir() 、getDir(String,int) 或其他儲存 API 來處理這個類別。 若呼叫應用程式移至已採用的儲存裝置,回傳路徑可能會隨時間改變,因此僅應保留相對路徑。 呼叫應用程式在回傳路徑下讀寫檔案不需要額外權限。 退稅檔案 |
| DeviceId |
會取得該上下文所關聯的裝置 ID。 |
| Display |
取得這個情境所關聯的顯示。 |
| ExternalCacheDir |
回傳主要外部檔案系統目錄的絕對路徑(該目錄位於 ExternalStorageDirectory 應用程式可放置快取檔案的位置)。 |
| FilesDir |
回傳檔案系統中存放檔案 OpenFileOutput(String, FileCreationMode) 的目錄的絕對路徑。 |
| Handle |
底層 Android 實例的帳號。 (繼承來源 Object) |
| IsDeviceProtectedStorage |
表示此上下文的儲存 API 是否由裝置保護儲存所支援。 |
| IsRestricted |
表示此上下文是否受限。 |
| IsUiContext |
如果上下文是可存取 、 或 |
| JniIdentityHashCode |
取得由互通執行時指派給此 Java 對等端的身份雜湊碼。 (繼承來源 Object) |
| JniManagedPeerState |
介面連接全域應用程式環境資訊。 (繼承來源 JavaObject) |
| JniPeerMembers |
取得用於調用此 Java 節點成員的 JNI 元資料。 |
| MainExecutor |
回傳 和 |
| MainLooper |
回傳當前程序主執行緒的 Looper。 |
| NoBackupFilesDir |
回傳檔案系統目錄的絕對路徑,類似 FilesDir。 |
| ObbDir |
回傳該應用程式的 OBB 檔案(若有)可找到的主要外部儲存目錄。 |
| OpPackageName |
回傳這個上下文中應該用於 |
| PackageCodePath |
回傳完整路徑至此情境的主要 Android 套件。 |
| PackageManager |
回傳 PackageManager 實例以查找全域套件資訊。 |
| PackageName |
回傳這個應用程式的套件名稱。 |
| PackageResourcePath |
回傳完整路徑至此情境的主要 Android 套件。 |
| Params |
回傳該上下文所用的參數集合,若是透過 |
| PeerReference |
取得這個 Java 節點的 JNI 物件參考。 (繼承來源 Object) |
| Resources |
回傳一個應用程式套件的 Resources 實例。 |
| Theme |
回傳與此上下文相關的主題物件。 |
| ThresholdClass |
此 API 支援 Mono for Android 基礎架構,並非直接從你的程式碼中使用。 |
| ThresholdType |
此 API 支援 Mono for Android 基礎架構,並非直接從你的程式碼中使用。 |
| UpdateableFlags |
取得可更新(即新增或移除)現有連線的綁定標誌清單。 |
| Wallpaper | |
| WallpaperDesiredMinimumHeight | |
| WallpaperDesiredMinimumWidth | |
方法
| 名稱 | Description |
|---|---|
| BindIsolatedService(Intent, Context+BindServiceFlags, String, IExecutor, IServiceConnection) |
請參考 bindIsolatedService(Intent, int, String, Executor, ServiceConnection) 呼叫 BindServiceFlags.of(long) 以取得 BindServiceFlags 物件。 |
| BindIsolatedService(Intent, Int32, String, IExecutor, IServiceConnection) |
在孤立服務的特定情況下,這種變化 |
| BindService(Intent, Bind, IExecutor, IServiceConnection) |
和 |
| BindService(Intent, Context+BindServiceFlags, IExecutor, IServiceConnection) |
請參見 bindService(Intent, int, Executor, ServiceConnection) 呼叫 BindServiceFlags.of(long) 以取得 BindServiceFlags 物件。 |
| BindService(Intent, IServiceConnection, Bind) |
連接應用程式服務,必要時建立服務。 |
| BindService(Intent, IServiceConnection, Context+BindServiceFlags) |
請參見 bindService(Intent, ServiceConnection, int) 呼叫 BindServiceFlags.of(long) 以取得 BindServiceFlags 物件。 |
| BindServiceAsUser(Intent, IServiceConnection, Context+BindServiceFlags, UserHandle) |
請參考 bindServiceAsUser(Intent, ServiceConnection, int, UserHandle) 呼叫 BindServiceFlags.of(long) 以取得 BindServiceFlags 物件。 |
| BindServiceAsUser(Intent, IServiceConnection, Int32, UserHandle) |
以與 相同的方式 |
| CheckCallingOrSelfPermission(String) |
確認 IPC <em>或 you</em> 的通話流程是否獲得特定權限。 |
| CheckCallingOrSelfUriPermission(Uri, ActivityFlags) |
確認 IPC <em>或 you</em> 的通話流程是否已獲授權存取特定 URI。 |
| CheckCallingOrSelfUriPermissions(IList<Uri>, Int32) |
確認 IPC <em>或 you</em> 的呼叫過程是否已被授權存取 URI 清單。 |
| CheckCallingPermission(String) |
確認你所處理的 IPC 的通話流程是否已獲得特定權限。 |
| CheckCallingUriPermission(Uri, ActivityFlags) |
確認呼叫流程與 UID 是否已獲得存取特定 URI 的權限。 |
| CheckCallingUriPermissions(IList<Uri>, Int32) |
確認呼叫程序與 UID 是否已獲得存取 URI 清單的權限。 |
| CheckContentUriPermissionFull(Uri, Int32, Int32, ActivityFlags) |
確認某個程序和 UID 是否已被授權存取特定內容 URI。 |
| CheckPermission(String, Int32, Int32) |
判斷該權限是否允許用於系統中執行的特定程序及使用者 ID。 |
| CheckSelfPermission(String) |
確認你</他們>是否<>獲得了特定的授權。 |
| CheckUriPermission(Uri, Int32, Int32, ActivityFlags) |
確認某個程序和 UID 是否被授權存取特定 URI。 |
| CheckUriPermission(Uri, String, String, Int32, Int32, ActivityFlags) |
檢查 Uri 和一般權限。 |
| CheckUriPermissions(IList<Uri>, Int32, Int32, Int32) |
確認某個程序與 UID 是否已被授權存取 URI 清單。 |
| ClearWallpaper() |
已淘汰.
此會員已被棄用。 |
| Clone() |
建立並回傳此物件的副本。 (繼承來源 Object) |
| Construct(JniObjectReference, JniObjectReferenceOptions) |
介面連接全域應用程式環境資訊。 (繼承來源 JavaObject) |
| CreateAttributionContext(String) |
回傳一個新的 Context 物件,針對目前的 Context,但屬性是不同的標籤。 |
| CreateConfigurationContext(Configuration) |
回傳一個新的 Context 物件,針對目前的 Context,但其資源會調整以符合給定的配置。 |
| CreateContext(ContextParams) |
建立具有特定屬性與行為的情境。 |
| CreateContextForSplit(String) |
為該分割名稱回傳一個新的 Context 物件。 |
| CreateDeviceContext(Int32) |
從目前上下文回傳一個新 |
| CreateDeviceProtectedStorageContext() |
回傳一個新的上下文物件,用於目前上下文,但其儲存 API 由裝置保護儲存所支援。 |
| CreateDisplayContext(Display) |
從目前上下文回傳一個新 |
| CreatePackageContext(String, PackageContextFlags) |
為給定的應用程式名稱回傳一個新的 Context 物件。 |
| CreateWindowContext(Display, Int32, Bundle) |
為給定 |
| CreateWindowContext(Int32, Bundle) |
為非活動視窗建立一個上下文。 |
| DatabaseList() |
回傳一組字串,標示與此上下文應用程式套件相關的私有資料庫。 |
| DeleteDatabase(String) |
刪除與此上下文應用程式套件相關的現有私有 SQLiteDatabase。 |
| DeleteFile(String) |
刪除與此上下文應用程式套件相關的指定私有檔案。 |
| DeleteSharedPreferences(String) |
刪除一個現有的共享偏好設定檔案。 |
| Dispose() |
釋放該 Java 節點所持有的資源。 (繼承來源 Object) |
| Dispose(Boolean) |
釋放該 Java 節點所持有的資源。 (繼承來源 Object) |
| DisposeUnlessReferenced() |
介面連接全域應用程式環境資訊。 (繼承來源 JavaObject) |
| EnforceCallingOrSelfPermission(String, String) |
如果你或你正在處理的 IPC 呼叫程序都沒有獲得特定權限,請拋出 |
| EnforceCallingOrSelfUriPermission(Uri, ActivityFlags, String) |
如果 IPC <em>或 you</em> 的呼叫過程尚未被授權存取特定 URI,請拋出 |
| EnforceCallingPermission(String, String) |
如果你正在處理的 IPC 呼叫程序尚未獲得特定權限,請拋出 |
| EnforceCallingUriPermission(Uri, ActivityFlags, String) |
如果呼叫程序和 UID 尚未獲得存取特定 URI 的權限,請拋出 |
| EnforcePermission(String, Int32, Int32, String) |
如果系統中執行的特定程序和使用者 ID 不允許該權限,請拋出 |
| EnforceUriPermission(Uri, Int32, Int32, ActivityFlags, String) |
如果某個程序和 UID 尚未被授權存取特定 URI,請拋出 |
| EnforceUriPermission(Uri, String, String, Int32, Int32, ActivityFlags, String) |
同時執行 Uri 和一般授權。 |
| Equals(Object) |
介面連接全域應用程式環境資訊。 (繼承來源 JavaObject) |
| Equals(Object) |
表示是否有其他物體「等同」於此物。 (繼承來源 Object) |
| FileList() |
回傳一個字串陣列,命名與該上下文應用套件相關的私有檔案。 |
| GetColor(Int32) |
回傳與特定資源 ID 相關且依當前主題設計的顏色。 |
| GetColorStateList(Int32) |
回傳與特定資源 ID 相關聯的色彩狀態清單,並依當前主題做樣式。 |
| GetDatabasePath(String) |
回傳儲存資料庫的檔案系統 |
| GetDir(String, FileCreationMode) |
擷取並建立一個新的目錄,應用程式可以放置自己的自訂資料檔案。 |
| GetDrawable(Int32) |
回傳一個可繪製的物件,與特定資源 ID 相關聯,並依當前主題做樣式。 |
| GetExternalCacheDirs() |
回傳所有共享/外部儲存裝置上應用程式專屬目錄的絕對路徑,該應用程式可放置其擁有的快取檔案。 |
| GetExternalFilesDir(String) |
回傳主共享/外部儲存裝置目錄的絕對路徑,該應用程式可放置其擁有的持久檔案。 |
| GetExternalFilesDirs(String) |
回傳所有共享/外部儲存裝置上應用程式專屬目錄的絕對路徑,該應用程式可在其中放置其擁有的持久檔案。 |
| GetExternalMediaDirs() |
回傳所有共享/外部儲存裝置上應用程式專屬目錄的絕對路徑,應用程式可在此放置媒體檔案。 |
| GetFileStreamPath(String) |
回傳檔案系統中建立檔案的絕對路徑,該檔案存放於該 |
| GetHashCode() |
回傳物件的雜湊碼值。 (繼承來源 Object) |
| GetObbDirs() |
回傳所有共享/外部儲存裝置上應用程式專屬目錄的絕對路徑,該目錄可找到該應用程式的 OBB 檔案(若有)。 |
| GetSharedPreferences(String, FileCreationMode) |
取回並保留偏好設定檔「名稱」的內容,回傳一個 SharedPreferences,透過它你可以取回並修改其值。 |
| GetString(Int32, Object[]) |
回傳應用程式套件預設字串表中的本地化字串。 |
| GetString(Int32) |
回傳應用程式套件預設字串表中的本地化字串。 |
| GetSystemService(Class) |
依類別將句柄回傳至系統層級服務。 |
| GetSystemService(String) |
以名稱將句柄回傳給系統層級服務。 |
| GetSystemServiceName(Class) |
取得由指定類別所代表的系統層級服務名稱。 |
| GetText(Int32) |
從應用程式套件預設字串表回傳一個本地化且有樣式的 CharSequence。 |
| GetTextFormatted(Int32) |
從應用程式套件預設字串表回傳一個本地化且有樣式的 CharSequence。 |
| GrantUriPermission(String, Uri, ActivityFlags) |
將特定 Uri 存取權限授予另一個套件,不論該套件是否擁有存取該 Uri 內容提供者的一般權限。 |
| JavaFinalize() |
已淘汰.
當垃圾回收判定該物件不再有相關參考時,由垃圾回收器呼叫。 (繼承來源 Object) |
| MoveDatabaseFrom(Context, String) |
將現有的資料庫檔案從給定的來源儲存上下文移動到這個上下文。 |
| MoveSharedPreferencesFrom(Context, String) |
將現有的共享偏好設定檔案從給定的來源儲存上下文移到這個上下文。 |
| Notify() |
喚醒一個正在該物件監視器上等待的執行緒。 (繼承來源 Object) |
| NotifyAll() |
喚醒所有等待該物件監視器的執行緒。 (繼承來源 Object) |
| ObtainStyledAttributes(IAttributeSet, Int32[], Int32, Int32) |
在此上下文主題中檢索樣式屬性資訊。 |
| ObtainStyledAttributes(IAttributeSet, Int32[]) |
在此上下文主題中檢索樣式屬性資訊。 |
| ObtainStyledAttributes(Int32, Int32[]) |
在此上下文主題中檢索樣式屬性資訊。 |
| ObtainStyledAttributes(Int32[]) |
在此上下文主題中檢索樣式屬性資訊。 |
| OpenFileInput(String) |
開啟與此上下文應用程式套件相關的私人檔案以進行閱讀。 |
| OpenFileOutput(String, FileCreationMode) |
開啟與此上下文應用程式套件相關的私有檔案以進行撰寫。 |
| OpenOrCreateDatabase(String, FileCreationMode, SQLiteDatabase+ICursorFactory, IDatabaseErrorHandler) |
開啟與此上下文應用程式套件相關的新私有 SQLiteDatabase。 |
| OpenOrCreateDatabase(String, FileCreationMode, SQLiteDatabase+ICursorFactory) |
開啟與此上下文應用程式套件相關的新私有 SQLiteDatabase。 |
| PeekWallpaper() |
已淘汰.
此會員已被棄用。 |
| RebindService(IServiceConnection, Context+BindServiceFlags) |
重新綁定一個應用程式服務,並更新了 bind 服務旗標 |
| RegisterComponentCallbacks(IComponentCallbacks) |
在 Context 的基礎應用程式中新增 |
| RegisterDeviceIdChangeListener(IExecutor, IIntConsumer) |
新增一個裝置 ID,變更監聽器到 |
| RegisterReceiver(BroadcastReceiver, IntentFilter, ActivityFlags) |
已淘汰.
註冊以接收意圖廣播,接收端可選擇性地暴露給即時應用程式。 |
| RegisterReceiver(BroadcastReceiver, IntentFilter, ReceiverFlags) |
註冊以接收意圖廣播,接收端可選擇性地暴露給即時應用程式。 更多資訊請參閱 registerReceiver(BroadcastReceiver, IntentFilter)。 預設情況下,即時應用程式無法與其他應用程式中的接收器互動,這讓你可以公開一個接收器,讓即時應用程式能互動。 欲了解更多意圖廣播資訊,請參閱 BroadcastReceiver。 截至Build.VERSION_CODES年。UPSIDE_DOWN_CAKE ,系統可在應用程式處於快取狀態時,將上下文註冊的廣播放入佇列。 當應用程式離開快取狀態,例如回到前景時,系統會傳送所有排隊的廣播。 某些廣播的多個實例可能會合併成一個廣播。 截至Build.VERSION_CODES年。ICE_CREAM_SANDWICH,使用此方法註冊的接收器會正確遵守廣播意圖所指定的 Intent.setPackage(字串)。 在此之前,這份郵件會被忽略,並送達所有匹配的註冊收件人。 使用這些資料時要小心。 參數接收器 BroadcastReceiver:負責處理廣播的 BroadcastReceiver。 此值可能是零值。 |
| RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ActivityFlags) |
已淘汰.
註冊以接收意圖廣播,並在 var<排程器>/var< 的情境>下執行。 |
| RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler, ReceiverFlags) |
註冊以接收意圖廣播,以便在排程器情境下執行。 更多資訊請參見 registerReceiver(BroadcastReceiver,IntentFilter,整數)與 registerReceiver(BroadcastReceiver,IntentFilter,String,Handler)。 欲了解更多意圖廣播資訊,請參閱 BroadcastReceiver。 截至Build.VERSION_CODES年。UPSIDE_DOWN_CAKE ,系統可在應用程式處於快取狀態時,將上下文註冊的廣播放入佇列。 當應用程式離開快取狀態,例如回到前景時,系統會傳送所有排隊的廣播。 某些廣播的多個實例可能會合併成一個廣播。 截至Build.VERSION_CODES年。ICE_CREAM_SANDWICH,使用此方法註冊的接收器會正確遵守廣播意圖所指定的 Intent.setPackage(字串)。 在此之前,這份郵件會被忽略,並送達所有匹配的註冊收件人。 使用這些資料時要小心。 參數接收器 BroadcastReceiver:負責處理廣播的 BroadcastReceiver。 |
| RegisterReceiver(BroadcastReceiver, IntentFilter, String, Handler) |
註冊以接收意圖廣播,並在 var<排程器>/var< 的情境>下執行。 |
| RegisterReceiver(BroadcastReceiver, IntentFilter) |
註冊一個廣播接收器(BroadcastReceiver)以便在主活動執行緒中執行。 |
| RemoveStickyBroadcast(Intent) |
已淘汰.
移除之前傳送的資料 |
| RemoveStickyBroadcastAsUser(Intent, UserHandle) |
已淘汰.
那個版本 |
| RevokeSelfPermissionOnKill(String) |
觸發執行時權限的非同步撤銷。 |
| RevokeSelfPermissionsOnKill(ICollection<String>) |
會觸發撤銷呼叫套件一個或多個權限。 |
| RevokeUriPermission(String, Uri, ActivityFlags) |
移除先前為特定目標套件新增 |
| RevokeUriPermission(Uri, ActivityFlags) |
移除先前加入或任何其他機制時新增 |
| SendBroadcast(Intent, String, Bundle) |
將該意圖廣播給所有有興趣的廣播接收器,並允許執行可選的必要許可。 |
| SendBroadcast(Intent, String) |
將該意圖廣播給所有有興趣的廣播接收器,並允許執行可選的必要許可。 |
| SendBroadcast(Intent) |
將該意圖廣播給所有有興趣的廣播接收器。 |
| SendBroadcastAsUser(Intent, UserHandle, String) |
那個版本 |
| SendBroadcastAsUser(Intent, UserHandle) |
那個版本 |
| SendBroadcastWithMultiplePermissions(Intent, String[]) |
將該意圖廣播給所有有興趣的廣播接收器,允許執行一系列必要的權限。 |
| SendOrderedBroadcast(Intent, String, BroadcastReceiver, Handler, Result, String, Bundle) |
那個版本 |
| SendOrderedBroadcast(Intent, String, Bundle, BroadcastReceiver, Handler, Result, String, Bundle) |
那個版本 |
| SendOrderedBroadcast(Intent, String, Bundle) |
將所定意圖廣播給所有有興趣的廣播接收器,一次一個傳送,讓更多優先接收者先消化該廣播,然後再傳送給較不偏好的接收器。 |
| SendOrderedBroadcast(Intent, String, String, BroadcastReceiver, Handler, Result, String, Bundle) |
那個版本 |
| SendOrderedBroadcast(Intent, String) |
將所定意圖廣播給所有有興趣的廣播接收器,一次一個傳送,讓更多優先接收者先消化該廣播,然後再傳送給較不偏好的接收器。 |
| SendOrderedBroadcastAsUser(Intent, UserHandle, String, BroadcastReceiver, Handler, Result, String, Bundle) |
版本
|
| SendStickyBroadcast(Intent, Bundle) |
執行 |
| SendStickyBroadcast(Intent) |
已淘汰.
執行 |
| SendStickyBroadcastAsUser(Intent, UserHandle) |
已淘汰.
那個版本 |
| SendStickyOrderedBroadcast(Intent, BroadcastReceiver, Handler, Result, String, Bundle) |
已淘汰.
那個版本 |
| SendStickyOrderedBroadcastAsUser(Intent, UserHandle, BroadcastReceiver, Handler, Result, String, Bundle) |
已淘汰.
版本
|
| SetHandle(IntPtr, JniHandleOwnership) |
設定 Handle 屬性。 (繼承來源 Object) |
| SetPeerReference(JniObjectReference, JniObjectReferenceOptions) |
介面連接全域應用程式環境資訊。 (繼承來源 JavaObject) |
| SetTheme(Int32) |
為這個情境設定基本主題。 |
| SetWallpaper(Bitmap) |
已淘汰.
此會員已被棄用。 |
| SetWallpaper(Stream) |
已淘汰.
此會員已被棄用。 |
| ShouldShowRequestPermissionRationale(String) |
判斷你是否應該在申請許可前先展示 UI。 |
| StartActivities(Intent[], Bundle) |
啟動多項新活動。 |
| StartActivities(Intent[]) |
就像 |
| StartActivity(Intent, Bundle) |
啟動一項新活動。 |
| StartActivity(Intent) |
就像 |
| StartActivity(Type) |
跟 startActivity(Intent, Bundle) 一樣,但沒有指定選項。 |
| StartForegroundService(Intent) |
類似 |
| StartInstrumentation(ComponentName, String, Bundle) |
開始執行一個 |
| StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32, Bundle) |
像 |
| StartIntentSender(IntentSender, Intent, ActivityFlags, ActivityFlags, Int32) |
就像 |
| StartService(Intent) |
請求啟動某項應用程式服務。 |
| StopService(Intent) |
請求停止某項應用程式服務。 |
| ToArray<T>() |
從這個 Java 陣列包裝器建立一個受管理陣列。 (繼承來源 Object) |
| ToString() |
回傳物件的字串表示。 (繼承來源 Object) |
| UnbindService(IServiceConnection) |
斷開應用程式服務。 |
| UnregisterComponentCallbacks(IComponentCallbacks) |
移除 |
| UnregisterDeviceIdChangeListener(IIntConsumer) |
移除一個裝置 ID,變更了 Context 中的監聽者。 |
| UnregisterFromRuntime() |
將此 Java 節點從互通執行時中取消註冊。 (繼承來源 Object) |
| UnregisterReceiver(BroadcastReceiver) |
取消註冊先前註冊的廣播接收器。 |
| UpdateServiceBindings(ICollection<Context.UpdateBindingParams>) |
對現有綁定進行批次更新。 |
| UpdateServiceGroup(IServiceConnection, Int32, Int32) |
對於先前綁定於 |
| Wait() |
導致目前執行緒等待被喚醒,通常是透過 <em>通知</><em 或 em>中斷</em> 來喚醒。 (繼承來源 Object) |
| Wait(Int64, Int32) |
會讓目前執行緒等待喚醒,通常是透過 <em>通知</><em 或 em>中斷</em>,或是經過一定的真實時間。 (繼承來源 Object) |
| Wait(Int64) |
會讓目前執行緒等待喚醒,通常是透過 <em>通知</><em 或 em>中斷</em>,或是經過一定的真實時間。 (繼承來源 Object) |
明確介面實作
| 名稱 | Description |
|---|---|
| IJavaPeerable.Disposed() |
介面連接全域應用程式環境資訊。 (繼承來源 JavaObject) |
| IJavaPeerable.Finalized() |
介面連接全域應用程式環境資訊。 (繼承來源 JavaObject) |
| IJavaPeerable.JniObjectReferenceControlBlock |
介面連接全域應用程式環境資訊。 (繼承來源 JavaObject) |
| IJavaPeerable.SetJniIdentityHashCode(Int32) |
介面連接全域應用程式環境資訊。 (繼承來源 JavaObject) |
| IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) |
介面連接全域應用程式環境資訊。 (繼承來源 JavaObject) |
| IJavaPeerable.SetPeerReference(JniObjectReference) |
介面連接全域應用程式環境資訊。 (繼承來源 JavaObject) |
擴充方法
| 名稱 | Description |
|---|---|
| GetJniTypeName(IJavaPeerable) |
取得實例 |
| JavaAs<TResult>(IJavaPeerable) |
試著強制 |
| JavaCast<TResult>(IJavaObject) |
執行 Android 執行時檢查型別轉換。 |
| JavaCast<TResult>(IJavaObject) |
介面連接全域應用程式環境資訊。 |
| TryJavaCast<TResult>(IJavaPeerable, TResult) |
試著強制 |