語言

Intent.IsMismatchingFilter 屬性

定義

意圖是否與接收元件中所有宣告的意圖過濾器不符。

public virtual bool IsMismatchingFilter { [Android.Runtime.Register("isMismatchingFilter", "()Z", "GetIsMismatchingFilterHandler", ApiSince=35)] get; }
[<get: Android.Runtime.Register("isMismatchingFilter", "()Z", "GetIsMismatchingFilterHandler", ApiSince=35)>]
member this.IsMismatchingFilter : bool

屬性值

若意圖與接收元件中宣告的任何意圖過濾器不符,則回傳為真。

屬性

備註

意圖是否與接收元件中所有宣告的意圖過濾器不符。

當元件收到意圖時,通常可透過以下方法取得:<ul><li>BroadcastReceiver#onReceive(Context, Intent)<li>Activity#getIntent()<>Activity#onNewIntent)<>android.app.Service#onStartCommand(Intent, int, int)<>android.app.Service#onBind(Intent)</ul> 開發者可呼叫此方法以檢查該意圖是否與其宣告的任何意圖過濾器不符。 當意圖發送者明確將元件設為 #setComponent 或 #setClassName時,即可傳送不匹配的意圖。

若意圖源自同一應用程式或系統內部,此方法必然回傳 false ,因為此類情況皆免於安全檢查。

Java 文件 android.content.Intent.isMismatchingFilter()。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於