BroadcastReceiver.PeekService(Context, Intent) メソッド

定義

既にバインドされているサービスにバインダーを提供します。

[Android.Runtime.Register("peekService", "(Landroid/content/Context;Landroid/content/Intent;)Landroid/os/IBinder;", "GetPeekService_Landroid_content_Context_Landroid_content_Intent_Handler")]
public virtual Android.OS.IBinder? PeekService(Android.Content.Context? myContext, Android.Content.Intent? service);
[<Android.Runtime.Register("peekService", "(Landroid/content/Context;Landroid/content/Intent;)Landroid/os/IBinder;", "GetPeekService_Landroid_content_Context_Landroid_content_Intent_Handler")>]
abstract member PeekService : Android.Content.Context * Android.Content.Intent -> Android.OS.IBinder
override this.PeekService : Android.Content.Context * Android.Content.Intent -> Android.OS.IBinder

パラメーター

myContext
Context

渡されたコンテキスト #onReceive(Context, Intent)

service
Intent

使用する既にバインドされているサービスを識別します。 を参照してください android.content.Context#bindService(Intent, ServiceConnection, int) 詳細については、以下を参照してください。

返品

既にバインドされているサービスにバインダーを提供します。 このメソッドは同期的であり、存在しない場合はターゲット サービスを開始しないため、onReceive(Context, Intent) から呼び出しても安全です。 peekService() が null 以外の IBinder インターフェイスを返すには、サービスが以前に発行しておく必要があります。 言い換えると、一部のコンポーネントで android.content.Context.bindService(Intent,ServiceConnection,int) が呼び出されている必要があります。

属性

注釈

既にバインドされているサービスにバインダーを提供します。 このメソッドは同期的であり、存在しない場合はターゲット サービスを開始しないため、 #onReceiveから呼び出しても安全です。

peekService() が null 以外の android.os.IBinder インターフェイスを返すには、サービスが以前に発行しておく必要があります。 つまり、一部のコンポーネントで android.content.Context#bindService(Intent, ServiceConnection, int) を呼び出す必要があります。

Javaドキュメント。

このページの一部は、によって作成および共有され、に記載されている条件に従って使用される作業に基づく変更です。

適用対象