共用方式為


TelephonyManager.UploadCallComposerPicture Method

Definition

Overloads

UploadCallComposerPicture(IPath, String, IExecutor, IOutcomeReceiver)

Uploads a picture to the carrier network for use with call composer.

UploadCallComposerPicture(Stream, String, IExecutor, IOutcomeReceiver)

Uploads a picture to the carrier network for use with call composer.

UploadCallComposerPicture(IPath, String, IExecutor, IOutcomeReceiver)

Uploads a picture to the carrier network for use with call composer.

[Android.Runtime.Register("uploadCallComposerPicture", "(Ljava/nio/file/Path;Ljava/lang/String;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetUploadCallComposerPicture_Ljava_nio_file_Path_Ljava_lang_String_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=31)]
public virtual void UploadCallComposerPicture (Java.Nio.FileNio.IPath pictureToUpload, string contentType, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("uploadCallComposerPicture", "(Ljava/nio/file/Path;Ljava/lang/String;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetUploadCallComposerPicture_Ljava_nio_file_Path_Ljava_lang_String_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=31)>]
abstract member UploadCallComposerPicture : Java.Nio.FileNio.IPath * string * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
override this.UploadCallComposerPicture : Java.Nio.FileNio.IPath * string * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

Parameters

pictureToUpload
IPath

Path to a local file containing the picture to upload.

contentType
String

The MIME type of the picture you're uploading (e.g. image/jpeg)

executor
IExecutor

The Executor on which the pictureToUpload file will be read from disk, as well as on which callback will be called.

callback
IOutcomeReceiver

A callback called when the upload operation terminates, either in success or in error.

Attributes

Remarks

Uploads a picture to the carrier network for use with call composer.

Java documentation for android.telephony.TelephonyManager.uploadCallComposerPicture(java.nio.file.Path, java.lang.String, java.util.concurrent.Executor, android.os.OutcomeReceiver<android.os.ParcelUuid, android.telephony.TelephonyManager.CallComposerException>).

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

UploadCallComposerPicture(Stream, String, IExecutor, IOutcomeReceiver)

Uploads a picture to the carrier network for use with call composer.

[Android.Runtime.Register("uploadCallComposerPicture", "(Ljava/io/InputStream;Ljava/lang/String;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetUploadCallComposerPicture_Ljava_io_InputStream_Ljava_lang_String_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=31)]
public virtual void UploadCallComposerPicture (System.IO.Stream pictureToUpload, string contentType, Java.Util.Concurrent.IExecutor executor, Android.OS.IOutcomeReceiver callback);
[<Android.Runtime.Register("uploadCallComposerPicture", "(Ljava/io/InputStream;Ljava/lang/String;Ljava/util/concurrent/Executor;Landroid/os/OutcomeReceiver;)V", "GetUploadCallComposerPicture_Ljava_io_InputStream_Ljava_lang_String_Ljava_util_concurrent_Executor_Landroid_os_OutcomeReceiver_Handler", ApiSince=31)>]
abstract member UploadCallComposerPicture : System.IO.Stream * string * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit
override this.UploadCallComposerPicture : System.IO.Stream * string * Java.Util.Concurrent.IExecutor * Android.OS.IOutcomeReceiver -> unit

Parameters

pictureToUpload
Stream

An InputStream that supplies the bytes representing the picture to upload. The client bears responsibility for closing this stream after callback is called with success or failure.

                               Additionally, if the stream supplies more bytes than the return value
                               of <code data-dev-comment-type="c">#getMaximumCallComposerPictureSize()</code>, the upload will be
                               aborted and the callback will be called with an exception containing
                               <code data-dev-comment-type="c">CallComposerException#ERROR_FILE_TOO_LARGE</code>.
contentType
String

The MIME type of the picture you're uploading (e.g. image/jpeg). The list of acceptable content types can be found at 3GPP TS 26.141 sections 4.2 and 4.3.

executor
IExecutor

The Executor on which the pictureToUpload stream will be read, as well as on which the callback will be called.

callback
IOutcomeReceiver

A callback called when the upload operation terminates, either in success or in error.

Attributes

Remarks

Uploads a picture to the carrier network for use with call composer.

This method allows a dialer app to upload a picture to the carrier network that can then later be attached to an outgoing call. In order to attach the picture to a call, use the ParcelUuid returned from callback upon successful upload as the value to TelecomManager#EXTRA_OUTGOING_PICTURE.

This functionality is only available to the app filling the RoleManager#ROLE_DIALER role on the device.

This functionality is only available when CarrierConfigManager#KEY_SUPPORTS_CALL_COMPOSER_BOOL is set to true in the bundle returned from #getCarrierConfig().

Java documentation for android.telephony.TelephonyManager.uploadCallComposerPicture(java.io.InputStream, java.lang.String, java.util.concurrent.Executor, android.os.OutcomeReceiver<android.os.ParcelUuid, android.telephony.TelephonyManager.CallComposerException>).

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