Sdílet prostřednictvím


MbmsStreamingSession.Create Method

Definition

Overloads

Create(Context, IExecutor, MbmsStreamingSessionCallback)

Create a new MbmsStreamingSession using the system default data subscription ID.

Create(Context, IExecutor, Int32, MbmsStreamingSessionCallback)

Create a new MbmsStreamingSession using the given subscription ID.

Create(Context, IExecutor, MbmsStreamingSessionCallback)

Create a new MbmsStreamingSession using the system default data subscription ID.

[Android.Runtime.Register("create", "(Landroid/content/Context;Ljava/util/concurrent/Executor;Landroid/telephony/mbms/MbmsStreamingSessionCallback;)Landroid/telephony/MbmsStreamingSession;", "", ApiSince=28)]
public static Android.Telephony.MbmsStreamingSession? Create (Android.Content.Context context, Java.Util.Concurrent.IExecutor executor, Android.Telephony.Mbms.MbmsStreamingSessionCallback callback);
[<Android.Runtime.Register("create", "(Landroid/content/Context;Ljava/util/concurrent/Executor;Landroid/telephony/mbms/MbmsStreamingSessionCallback;)Landroid/telephony/MbmsStreamingSession;", "", ApiSince=28)>]
static member Create : Android.Content.Context * Java.Util.Concurrent.IExecutor * Android.Telephony.Mbms.MbmsStreamingSessionCallback -> Android.Telephony.MbmsStreamingSession

Parameters

context
Context

The Context to use.

executor
IExecutor

The executor on which you wish to execute callbacks.

callback
MbmsStreamingSessionCallback

A callback object on which you wish to receive results of asynchronous operations.

Returns

An instance of MbmsStreamingSession, or null if an error occurred.

Attributes

Remarks

Create a new MbmsStreamingSession using the system default data subscription ID. See #create(Context, Executor, int, MbmsStreamingSessionCallback).

Java documentation for android.telephony.MbmsStreamingSession.create(android.content.Context, java.util.concurrent.Executor, android.telephony.mbms.MbmsStreamingSessionCallback).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Create(Context, IExecutor, Int32, MbmsStreamingSessionCallback)

Create a new MbmsStreamingSession using the given subscription ID.

[Android.Runtime.Register("create", "(Landroid/content/Context;Ljava/util/concurrent/Executor;ILandroid/telephony/mbms/MbmsStreamingSessionCallback;)Landroid/telephony/MbmsStreamingSession;", "", ApiSince=28)]
public static Android.Telephony.MbmsStreamingSession? Create (Android.Content.Context context, Java.Util.Concurrent.IExecutor executor, int subscriptionId, Android.Telephony.Mbms.MbmsStreamingSessionCallback callback);
[<Android.Runtime.Register("create", "(Landroid/content/Context;Ljava/util/concurrent/Executor;ILandroid/telephony/mbms/MbmsStreamingSessionCallback;)Landroid/telephony/MbmsStreamingSession;", "", ApiSince=28)>]
static member Create : Android.Content.Context * Java.Util.Concurrent.IExecutor * int * Android.Telephony.Mbms.MbmsStreamingSessionCallback -> Android.Telephony.MbmsStreamingSession

Parameters

context
Context

The Context to use.

executor
IExecutor

The executor on which you wish to execute callbacks.

subscriptionId
Int32

The subscription ID to use.

callback
MbmsStreamingSessionCallback

A callback object on which you wish to receive results of asynchronous operations.

Returns

An instance of MbmsStreamingSession, or null if an error occurred.

Attributes

Remarks

Create a new MbmsStreamingSession using the given subscription ID.

Note that this call will bind a remote service. You may not call this method on your app's main thread.

You may only have one instance of MbmsStreamingSession per UID. If you call this method while there is an active instance of MbmsStreamingSession in your process (in other words, one that has not had #close() called on it), this method will throw an IllegalStateException. If you call this method in a different process running under the same UID, an error will be indicated via MbmsStreamingSessionCallback#onError(int, String).

Note that initialization may fail asynchronously. If you wish to try again after you receive such an asynchronous error, you must call #close() on the instance of MbmsStreamingSession that you received before calling this method again.

Java documentation for android.telephony.MbmsStreamingSession.create(android.content.Context, java.util.concurrent.Executor, int, android.telephony.mbms.MbmsStreamingSessionCallback).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to