語言

IntentSender.SendIntent 方法

定義

多載

名稱 Description
SendIntent(Context, Result, Intent, IntentSender+IOnFinished, Handler)

執行與此 IntentSender 相關的操作,讓呼叫者指定使用意圖的資訊,並在發送完成時收到通知。

SendIntent(Context, Result, Intent, IntentSender+IOnFinished, Handler, String)

執行與此 IntentSender 相關的操作,讓呼叫者指定使用意圖的資訊,並在發送完成時收到通知。

SendIntent(Context, Result, Intent, String, Bundle, IExecutor, IntentSender+IOnFinished)

執行與此 IntentSender 相關的操作,讓呼叫者指定使用意圖的資訊,並在發送完成時收到通知。

SendIntent(Context, Result, Intent, IntentSender+IOnFinished, Handler)

執行與此 IntentSender 相關的操作,讓呼叫者指定使用意圖的資訊,並在發送完成時收到通知。

[Android.Runtime.Register("sendIntent", "(Landroid/content/Context;ILandroid/content/Intent;Landroid/content/IntentSender$OnFinished;Landroid/os/Handler;)V", "GetSendIntent_Landroid_content_Context_ILandroid_content_Intent_Landroid_content_IntentSender_OnFinished_Landroid_os_Handler_Handler")]
public virtual void SendIntent(Android.Content.Context? context, Android.App.Result code, Android.Content.Intent? intent, Android.Content.IntentSender.IOnFinished? onFinished, Android.OS.Handler? handler);
[<Android.Runtime.Register("sendIntent", "(Landroid/content/Context;ILandroid/content/Intent;Landroid/content/IntentSender$OnFinished;Landroid/os/Handler;)V", "GetSendIntent_Landroid_content_Context_ILandroid_content_Intent_Landroid_content_IntentSender_OnFinished_Landroid_os_Handler_Handler")>]
abstract member SendIntent : Android.Content.Context * Android.App.Result * Android.Content.Intent * Android.Content.IntentSender.IOnFinished * Android.OS.Handler -> unit
override this.SendIntent : Android.Content.Context * Android.App.Result * Android.Content.Intent * Android.Content.IntentSender.IOnFinished * Android.OS.Handler -> unit

參數

context
Context

來電者的背景。 若 <var>intent</var> 也是 null,則可能是 null。

code
Result

結果代碼用來回傳給意圖發送者的目標。

intent
Intent

額外意圖資料。 請參閱 Intent#fillIn Intent.fillIn() 有關此如何應用於原始意圖的資訊。 使用 null 鍵則不修改原始意圖。

onFinished
IntentSender.IOnFinished

當發送完成後,物件要回撥,或是空物件表示沒有回撥。

handler
Handler

處理器識別應進行回調的執行緒。 若為空,回調將從程序的執行緒池中進行。

屬性

例外狀況

如果 IntentSender 不再允許更多意圖透過它傳送,則會拋出 CanceledIntentException。

備註

Java 文件 android.content.IntentSender.sendIntent(android.content.Context, int, android.content.Intent, android.content.OnFinished, android.os.Handler)。

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

適用於

SendIntent(Context, Result, Intent, IntentSender+IOnFinished, Handler, String)

執行與此 IntentSender 相關的操作,讓呼叫者指定使用意圖的資訊,並在發送完成時收到通知。

[Android.Runtime.Register("sendIntent", "(Landroid/content/Context;ILandroid/content/Intent;Landroid/content/IntentSender$OnFinished;Landroid/os/Handler;Ljava/lang/String;)V", "GetSendIntent_Landroid_content_Context_ILandroid_content_Intent_Landroid_content_IntentSender_OnFinished_Landroid_os_Handler_Ljava_lang_String_Handler")]
public virtual void SendIntent(Android.Content.Context? context, Android.App.Result code, Android.Content.Intent? intent, Android.Content.IntentSender.IOnFinished? onFinished, Android.OS.Handler? handler, string? requiredPermission);
[<Android.Runtime.Register("sendIntent", "(Landroid/content/Context;ILandroid/content/Intent;Landroid/content/IntentSender$OnFinished;Landroid/os/Handler;Ljava/lang/String;)V", "GetSendIntent_Landroid_content_Context_ILandroid_content_Intent_Landroid_content_IntentSender_OnFinished_Landroid_os_Handler_Ljava_lang_String_Handler")>]
abstract member SendIntent : Android.Content.Context * Android.App.Result * Android.Content.Intent * Android.Content.IntentSender.IOnFinished * Android.OS.Handler * string -> unit
override this.SendIntent : Android.Content.Context * Android.App.Result * Android.Content.Intent * Android.Content.IntentSender.IOnFinished * Android.OS.Handler * string -> unit

參數

context
Context

來電者的背景。 若 <var>intent</var> 也是 null,則可能是 null。

code
Result

結果代碼用來回傳給意圖發送者的目標。

intent
Intent

額外意圖資料。 請參閱 Intent#fillIn Intent.fillIn() 有關此如何應用於原始意圖的資訊。 使用 null 鍵則不修改原始意圖。

onFinished
IntentSender.IOnFinished

當發送完成後,物件要回撥,或是空物件表示沒有回撥。

handler
Handler

處理器識別應進行回調的執行緒。 若為空,回調將從程序的執行緒池中進行。

requiredPermission
String

PendingIntent 的收件人必須持有的許可名稱。 此定義僅適用於廣播意圖,對應於 中的 SendBroadcast(Intent, String)許可論證。 若為無效,則無需授權。

屬性

例外狀況

如果 IntentSender 不再允許更多意圖透過它傳送,則會拋出 CanceledIntentException。

備註

Java 文件 android.content.IntentSender.sendIntent(android.content.Context, int, android.content.Intent, android.content.OnFinished, android.os.Handler)。

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

適用於

SendIntent(Context, Result, Intent, String, Bundle, IExecutor, IntentSender+IOnFinished)

執行與此 IntentSender 相關的操作,讓呼叫者指定使用意圖的資訊,並在發送完成時收到通知。

[Android.Runtime.Register("sendIntent", "(Landroid/content/Context;ILandroid/content/Intent;Ljava/lang/String;Landroid/os/Bundle;Ljava/util/concurrent/Executor;Landroid/content/IntentSender$OnFinished;)V", "GetSendIntent_Landroid_content_Context_ILandroid_content_Intent_Ljava_lang_String_Landroid_os_Bundle_Ljava_util_concurrent_Executor_Landroid_content_IntentSender_OnFinished_Handler", ApiSince=36)]
public virtual void SendIntent(Android.Content.Context? context, Android.App.Result code, Android.Content.Intent? intent, string? requiredPermission, Android.OS.Bundle? options, Java.Util.Concurrent.IExecutor? executor, Android.Content.IntentSender.IOnFinished? onFinished);
[<Android.Runtime.Register("sendIntent", "(Landroid/content/Context;ILandroid/content/Intent;Ljava/lang/String;Landroid/os/Bundle;Ljava/util/concurrent/Executor;Landroid/content/IntentSender$OnFinished;)V", "GetSendIntent_Landroid_content_Context_ILandroid_content_Intent_Ljava_lang_String_Landroid_os_Bundle_Ljava_util_concurrent_Executor_Landroid_content_IntentSender_OnFinished_Handler", ApiSince=36)>]
abstract member SendIntent : Android.Content.Context * Android.App.Result * Android.Content.Intent * string * Android.OS.Bundle * Java.Util.Concurrent.IExecutor * Android.Content.IntentSender.IOnFinished -> unit
override this.SendIntent : Android.Content.Context * Android.App.Result * Android.Content.Intent * string * Android.OS.Bundle * Java.Util.Concurrent.IExecutor * Android.Content.IntentSender.IOnFinished -> unit

參數

context
Context

來電者的背景。 若意圖也為零,則此為空。

code
Result

結果代碼用來回傳給意圖發送者的目標。

intent
Intent

額外意圖資料。 有關如何應用於原始意圖的資訊,請參見 Intent.fillIn() 使用 null 鍵則不修改原始意圖。

requiredPermission
String

PendingIntent 的收件人必須持有的許可名稱。 此條件僅適用於廣播意圖,對應於 Context.sendOrderedBroadcast(Intent, String) 中的權限參數。 若為零,則無需授權。

options
Bundle

呼叫者希望提供更多選項以修改傳送行為。 通常是透過使用 ActivityOptions 套用到活動開始時建立的。 此值可能是零值。

executor
IExecutor

執行者識別應進行回調的執行緒。 若為空,回調將從程序的執行緒池中進行。

onFinished
IntentSender.IOnFinished

當發送完成後,物件要回撥,或是空物件表示沒有回撥。

屬性

備註

執行與此 IntentSender 相關的操作,讓呼叫者指定使用意圖的資訊,並在發送完成時收到通知。

Java 文件 android.content.IntentSender.sendIntent(android.content.Context, int, android.content.Intent, java.lang.String, android.os.Bundle, java.util.concurrent.Executor, android.content.IntentSender.OnFinished)。

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

適用於