ServiceInfo 類別
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
您可以取得關於特定應用程式服務的資訊。
[Android.Runtime.Register("android/content/pm/ServiceInfo", DoNotGenerateAcw=true)]
public class ServiceInfo : Android.Content.PM.ComponentInfo, Android.OS.IParcelable, IDisposable
[<Android.Runtime.Register("android/content/pm/ServiceInfo", DoNotGenerateAcw=true)>]
type ServiceInfo = class
inherit ComponentInfo
interface IParcelable
interface IJavaObject
interface IDisposable
interface IJavaPeerable
- 繼承
- 屬性
- 實作
備註
您可以取得關於特定應用程式服務的資訊。 這對應於從 AndroidManifest.xml<服務>標籤。
Java 文件 android.content.pm.ServiceInfo。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
建構函式
| 名稱 | Description |
|---|---|
| ServiceInfo() | |
| ServiceInfo(IntPtr, JniHandleOwnership) |
用於建立 JNI 物件受管理表示的建構器;由執行時呼叫。 |
| ServiceInfo(ServiceInfo) | |
欄位
| 名稱 | Description |
|---|---|
| FlagAllowSharedIsolatedProcess |
已淘汰.
位元中的 |
| FlagExternalService |
已淘汰.
位元中的 |
| FlagIsolatedProcess |
已淘汰.
位元中的 |
| FlagNativeService |
已淘汰.
位元中的 |
| FlagSingleUser |
已淘汰.
位元中的 |
| FlagStopWithTask |
已淘汰.
位元中的 |
| FlagUseAppZygote |
已淘汰.
位元中的 |
| ForegroundServiceTypeCamera |
已淘汰.
常數對應屬性中的 |
| ForegroundServiceTypeConnectedDevice |
已淘汰.
常數對應屬性中的 |
| ForegroundServiceTypeDataSync |
已淘汰.
常數對應屬性中的 |
| ForegroundServiceTypeHealth |
已淘汰.
常數對應屬性中的 |
| ForegroundServiceTypeLocation |
已淘汰.
常數對應屬性中的 |
| ForegroundServiceTypeManifest |
已淘汰.
特殊值表示使用清單檔案中設定的所有型別。 |
| ForegroundServiceTypeMediaPlayback |
已淘汰.
常數對應屬性中的 |
| ForegroundServiceTypeMediaProcessing |
已淘汰.
常數對應屬性中的 |
| ForegroundServiceTypeMediaProjection |
已淘汰.
常數對應屬性中的 |
| ForegroundServiceTypeMicrophone |
已淘汰.
常數對應屬性中的 |
| ForegroundServiceTypeNone |
預設的前景服務類型如果沒有在清單檔案中設定。 |
| ForegroundServiceTypePhoneCall |
已淘汰.
常數對應屬性中的 |
| ForegroundServiceTypeRemoteMessaging |
已淘汰.
常數對應屬性中的 |
| ForegroundServiceTypeShortService |
已淘汰.
一種用於「短暫」服務的前景服務類型,對應 |
| ForegroundServiceTypeSpecialUse |
已淘汰.
常數對應屬性中的 |
| ForegroundServiceTypeSystemExempted |
已淘汰.
常數對應屬性中的 |
屬性
| 名稱 | Description |
|---|---|
| ApplicationInfo |
關於此元件所屬應用程式/套件的全局資訊。 (繼承來源 ComponentInfo) |
| AttributionTags |
一組歸因標籤,應該自動套用到這個元件。 (繼承來源 ComponentInfo) |
| Banner |
此元件橫幅的可繪製資源識別碼(在套件資源中)。 (繼承來源 PackageItemInfo) |
| BannerResource |
回傳橫幅資源識別碼以用於此元件。 (繼承來源 ComponentInfo) |
| Class |
回傳此 |
| Creator | |
| DescriptionRes |
一個包含使用者可讀元件描述的字串資源識別碼(位於套件資源中)。 (繼承來源 ComponentInfo) |
| DirectBootAware |
表示此元件是否已知直接開機生命週期,且可在使用者輸入憑證(如鎖定模式或 PIN 碼)前安全執行。 (繼承來源 ComponentInfo) |
| Enabled |
表示此元件是否可實例化。 (繼承來源 ComponentInfo) |
| Exported |
若此元件可供其他應用程式使用,則設為 true。 (繼承來源 ComponentInfo) |
| Flags |
這些選項是在服務聲明中已設定的清單。 |
| ForegroundServiceType |
返回前景服務類型,請在清單中指定。 |
| Handle |
底層 Android 實例的帳號。 (繼承來源 Object) |
| Icon |
可繪製的資源識別碼(位於套件資源中)的元件圖示。 (繼承來源 PackageItemInfo) |
| IconResource |
回傳圖示資源識別碼以用於此元件。 (繼承來源 ComponentInfo) |
| IsArchived |
該套件目前是否處於存檔狀態。 (繼承來源 PackageItemInfo) |
| IsEnabled |
回傳此元件及其包圍應用程式是否啟用。 (繼承來源 ComponentInfo) |
| JniIdentityHashCode |
取得由互通執行時指派給此 Java 對等端的身份雜湊碼。 (繼承來源 Object) |
| JniManagedPeerState |
您可以取得關於特定應用程式服務的資訊。 (繼承來源 JavaObject) |
| JniPeerMembers |
您可以取得關於特定應用程式服務的資訊。 |
| LabelRes |
套件資源中的字串資源識別碼,該元件標籤的標示。 (繼承來源 PackageItemInfo) |
| Logo |
可繪製的資源識別碼(位於套件資源中)的元件標誌。 (繼承來源 PackageItemInfo) |
| LogoResource |
回傳標誌資源識別碼以用於此元件。 (繼承來源 ComponentInfo) |
| MetaData |
與此元件相關的額外元資料。 (繼承來源 PackageItemInfo) |
| Name |
此物品的公開名稱。 (繼承來源 PackageItemInfo) |
| NonLocalizedLabel |
AndroidManifest 檔案中提供的字串(如果有的話)。 (繼承來源 PackageItemInfo) |
| PackageName |
這個物品所屬的包裹名稱。 (繼承來源 PackageItemInfo) |
| PeerReference |
取得這個 Java 節點的 JNI 物件參考。 (繼承來源 Object) |
| Permission |
存取此服務所需權限的可選名稱。 |
| ProcessName |
這個元件應該執行的程序名稱。 (繼承來源 ComponentInfo) |
| SplitName |
該組件所宣告的分裂名稱。 (繼承來源 ComponentInfo) |
| ThresholdClass |
此 API 支援 Mono for Android 基礎架構,並非直接從你的程式碼中使用。 |
| ThresholdType |
此 API 支援 Mono for Android 基礎架構,並非直接從你的程式碼中使用。 |
方法
明確介面實作
| 名稱 | Description |
|---|---|
| IJavaPeerable.Disposed() |
您可以取得關於特定應用程式服務的資訊。 (繼承來源 JavaObject) |
| IJavaPeerable.Finalized() |
您可以取得關於特定應用程式服務的資訊。 (繼承來源 JavaObject) |
| IJavaPeerable.JniObjectReferenceControlBlock |
您可以取得關於特定應用程式服務的資訊。 (繼承來源 JavaObject) |
| IJavaPeerable.SetJniIdentityHashCode(Int32) |
您可以取得關於特定應用程式服務的資訊。 (繼承來源 JavaObject) |
| IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) |
您可以取得關於特定應用程式服務的資訊。 (繼承來源 JavaObject) |
| IJavaPeerable.SetPeerReference(JniObjectReference) |
您可以取得關於特定應用程式服務的資訊。 (繼承來源 JavaObject) |
| IJavaPeerable.UnregisterFromRuntime() |
您可以取得關於特定應用程式服務的資訊。 |
擴充方法
| 名稱 | Description |
|---|---|
| GetJniTypeName(IJavaPeerable) |
取得實例 |
| JavaAs<TResult>(IJavaPeerable) |
試著強制 |
| JavaCast<TResult>(IJavaObject) |
執行 Android 執行時檢查型別轉換。 |
| JavaCast<TResult>(IJavaObject) |
您可以取得關於特定應用程式服務的資訊。 |
| TryJavaCast<TResult>(IJavaPeerable, TResult) |
試著強制 |