다음을 통해 공유


ContactsContract.Contacts.OpenContactPhotoInputStream Method

Definition

Overloads

OpenContactPhotoInputStream(ContentResolver, Uri)

Opens an InputStream for the contacts's thumbnail photo and returns the photo as a byte stream.

OpenContactPhotoInputStream(ContentResolver, Uri, Boolean)

Opens an InputStream for the contacts's photo and returns the photo as a byte stream.

OpenContactPhotoInputStream(ContentResolver, Uri)

Opens an InputStream for the contacts's thumbnail photo and returns the photo as a byte stream.

[Android.Runtime.Register("openContactPhotoInputStream", "(Landroid/content/ContentResolver;Landroid/net/Uri;)Ljava/io/InputStream;", "")]
public static System.IO.Stream? OpenContactPhotoInputStream (Android.Content.ContentResolver? cr, Android.Net.Uri? contactUri);
[<Android.Runtime.Register("openContactPhotoInputStream", "(Landroid/content/ContentResolver;Landroid/net/Uri;)Ljava/io/InputStream;", "")>]
static member OpenContactPhotoInputStream : Android.Content.ContentResolver * Android.Net.Uri -> System.IO.Stream

Parameters

cr
ContentResolver

The content resolver to use for querying

contactUri
Uri

the contact whose photo should be used. This can be used with either a #CONTENT_URI or a #CONTENT_LOOKUP_URI URI.

Returns

an InputStream of the photo, or null if no photo is present

Attributes

Remarks

Opens an InputStream for the contacts's thumbnail photo and returns the photo as a byte stream.

Java documentation for android.provider.ContactsContract.Contacts.openContactPhotoInputStream(android.content.ContentResolver, android.net.Uri).

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.

See also

  • <xref:Android.Provider.ContactsContract.Contacts.OpenContactPhotoInputStream(Android.Content.ContentResolver%2c+Android.Net.Uri%2c+Android.Net.Uri)>

Applies to

OpenContactPhotoInputStream(ContentResolver, Uri, Boolean)

Opens an InputStream for the contacts's photo and returns the photo as a byte stream.

[Android.Runtime.Register("openContactPhotoInputStream", "(Landroid/content/ContentResolver;Landroid/net/Uri;Z)Ljava/io/InputStream;", "")]
public static System.IO.Stream? OpenContactPhotoInputStream (Android.Content.ContentResolver? cr, Android.Net.Uri? contactUri, bool preferHighres);
[<Android.Runtime.Register("openContactPhotoInputStream", "(Landroid/content/ContentResolver;Landroid/net/Uri;Z)Ljava/io/InputStream;", "")>]
static member OpenContactPhotoInputStream : Android.Content.ContentResolver * Android.Net.Uri * bool -> System.IO.Stream

Parameters

cr
ContentResolver

The content resolver to use for querying

contactUri
Uri

the contact whose photo should be used. This can be used with either a #CONTENT_URI or a #CONTENT_LOOKUP_URI URI.

preferHighres
Boolean

If this is true and the contact has a higher resolution photo available, it is returned. If false, this function always tries to get the thumbnail

Returns

an InputStream of the photo, or null if no photo is present

Attributes

Remarks

Opens an InputStream for the contacts's photo and returns the photo as a byte stream.

Java documentation for android.provider.ContactsContract.Contacts.openContactPhotoInputStream(android.content.ContentResolver, android.net.Uri, boolean).

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