Freigeben über


BlobStoreManager.AcquireLease Method

Definition

Overloads

AcquireLease(BlobHandle, ICharSequence)

Acquire a lease to the blob represented by blobHandle.

AcquireLease(BlobHandle, Int32)

Acquire a lease to the blob represented by blobHandle.

AcquireLease(BlobHandle, String)

Acquire a lease to the blob represented by blobHandle.

AcquireLease(BlobHandle, ICharSequence, Int64)

Acquire a lease to the blob represented by blobHandle.

AcquireLease(BlobHandle, Int32, Int64)

Acquire a lease to the blob represented by blobHandle.

AcquireLease(BlobHandle, String, Int64)

Acquire a lease to the blob represented by blobHandle.

AcquireLease(BlobHandle, ICharSequence)

Acquire a lease to the blob represented by blobHandle.

[Android.Runtime.Register("acquireLease", "(Landroid/app/blob/BlobHandle;Ljava/lang/CharSequence;)V", "GetAcquireLease_Landroid_app_blob_BlobHandle_Ljava_lang_CharSequence_Handler", ApiSince=30)]
public virtual void AcquireLease (Android.App.Blob.BlobHandle blobHandle, Java.Lang.ICharSequence description);
[<Android.Runtime.Register("acquireLease", "(Landroid/app/blob/BlobHandle;Ljava/lang/CharSequence;)V", "GetAcquireLease_Landroid_app_blob_BlobHandle_Ljava_lang_CharSequence_Handler", ApiSince=30)>]
abstract member AcquireLease : Android.App.Blob.BlobHandle * Java.Lang.ICharSequence -> unit
override this.AcquireLease : Android.App.Blob.BlobHandle * Java.Lang.ICharSequence -> unit

Parameters

blobHandle
BlobHandle

the BlobHandle representing the blob that the caller wants to acquire a lease for.

description
ICharSequence

a short description string that can be surfaced to the user explaining what the blob is used for. It is recommended to keep this description brief. This may be truncated and ellipsized if it is too long to be displayed to the user.

Attributes

Remarks

Acquire a lease to the blob represented by blobHandle. This lease indicates to the system that the caller wants the blob to be kept around.

This is a variant of #acquireLease(BlobHandle, int) taking a CharSequence for description. It is highly recommended that callers only use this when a valid resource ID for description could not be provided. Otherwise, apps should prefer using #acquireLease(BlobHandle, int) which will allow description to be localized.

This is similar to #acquireLease(BlobHandle, CharSequence, long) except clients don't have to specify the lease expiry time upfront using this API and need to explicitly release the lease using #releaseLease(BlobHandle) when they no longer like to keep a blob around.

Any active leases will be automatically released when the blob's expiry time (BlobHandle#getExpiryTimeMillis()) is elapsed.

This lease information is persisted and calling this more than once will result in latest lease overriding any previous lease.

When an app acquires a lease on a blob, the System will try to keep this blob around but note that it can still be deleted if it was requested by the user.

Java documentation for android.app.blob.BlobStoreManager.acquireLease(android.app.blob.BlobHandle, java.lang.CharSequence).

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

AcquireLease(BlobHandle, Int32)

Acquire a lease to the blob represented by blobHandle.

[Android.Runtime.Register("acquireLease", "(Landroid/app/blob/BlobHandle;I)V", "GetAcquireLease_Landroid_app_blob_BlobHandle_IHandler", ApiSince=30)]
public virtual void AcquireLease (Android.App.Blob.BlobHandle blobHandle, int descriptionResId);
[<Android.Runtime.Register("acquireLease", "(Landroid/app/blob/BlobHandle;I)V", "GetAcquireLease_Landroid_app_blob_BlobHandle_IHandler", ApiSince=30)>]
abstract member AcquireLease : Android.App.Blob.BlobHandle * int -> unit
override this.AcquireLease : Android.App.Blob.BlobHandle * int -> unit

Parameters

blobHandle
BlobHandle

the BlobHandle representing the blob that the caller wants to acquire a lease for.

descriptionResId
Int32

the resource id for a short description string that can be surfaced to the user explaining what the blob is used for.

Attributes

Remarks

Acquire a lease to the blob represented by blobHandle. This lease indicates to the system that the caller wants the blob to be kept around.

This is similar to #acquireLease(BlobHandle, int, long) except clients don't have to specify the lease expiry time upfront using this API and need to explicitly release the lease using #releaseLease(BlobHandle) when they no longer like to keep a blob around.

Any active leases will be automatically released when the blob's expiry time (BlobHandle#getExpiryTimeMillis()) is elapsed.

This lease information is persisted and calling this more than once will result in latest lease overriding any previous lease.

When an app acquires a lease on a blob, the System will try to keep this blob around but note that it can still be deleted if it was requested by the user.

In case the resource name for the descriptionResId is modified as part of an app update, apps should re-acquire the lease with the new resource id.

Java documentation for android.app.blob.BlobStoreManager.acquireLease(android.app.blob.BlobHandle, int).

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

AcquireLease(BlobHandle, String)

Acquire a lease to the blob represented by blobHandle.

public void AcquireLease (Android.App.Blob.BlobHandle blobHandle, string description);
member this.AcquireLease : Android.App.Blob.BlobHandle * string -> unit

Parameters

blobHandle
BlobHandle

the BlobHandle representing the blob that the caller wants to acquire a lease for.

description
String

a short description string that can be surfaced to the user explaining what the blob is used for. It is recommended to keep this description brief. This may be truncated and ellipsized if it is too long to be displayed to the user.

Remarks

Acquire a lease to the blob represented by blobHandle. This lease indicates to the system that the caller wants the blob to be kept around.

This is a variant of #acquireLease(BlobHandle, int) taking a CharSequence for description. It is highly recommended that callers only use this when a valid resource ID for description could not be provided. Otherwise, apps should prefer using #acquireLease(BlobHandle, int) which will allow description to be localized.

This is similar to #acquireLease(BlobHandle, CharSequence, long) except clients don't have to specify the lease expiry time upfront using this API and need to explicitly release the lease using #releaseLease(BlobHandle) when they no longer like to keep a blob around.

Any active leases will be automatically released when the blob's expiry time (BlobHandle#getExpiryTimeMillis()) is elapsed.

This lease information is persisted and calling this more than once will result in latest lease overriding any previous lease.

When an app acquires a lease on a blob, the System will try to keep this blob around but note that it can still be deleted if it was requested by the user.

Java documentation for android.app.blob.BlobStoreManager.acquireLease(android.app.blob.BlobHandle, java.lang.CharSequence).

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

AcquireLease(BlobHandle, ICharSequence, Int64)

Acquire a lease to the blob represented by blobHandle.

[Android.Runtime.Register("acquireLease", "(Landroid/app/blob/BlobHandle;Ljava/lang/CharSequence;J)V", "GetAcquireLease_Landroid_app_blob_BlobHandle_Ljava_lang_CharSequence_JHandler", ApiSince=30)]
public virtual void AcquireLease (Android.App.Blob.BlobHandle blobHandle, Java.Lang.ICharSequence description, long leaseExpiryTimeMillis);
[<Android.Runtime.Register("acquireLease", "(Landroid/app/blob/BlobHandle;Ljava/lang/CharSequence;J)V", "GetAcquireLease_Landroid_app_blob_BlobHandle_Ljava_lang_CharSequence_JHandler", ApiSince=30)>]
abstract member AcquireLease : Android.App.Blob.BlobHandle * Java.Lang.ICharSequence * int64 -> unit
override this.AcquireLease : Android.App.Blob.BlobHandle * Java.Lang.ICharSequence * int64 -> unit

Parameters

blobHandle
BlobHandle

the BlobHandle representing the blob that the caller wants to acquire a lease for.

description
ICharSequence

a short description string that can be surfaced to the user explaining what the blob is used for. It is recommended to keep this description brief. This may be truncated and ellipsized if it is too long to be displayed to the user.

leaseExpiryTimeMillis
Int64

the time in milliseconds after which the lease can be automatically released, in System#currentTimeMillis() timebase. If its value is 0, then the behavior of this API is identical to #acquireLease(BlobHandle, int) where clients have to explicitly call #releaseLease(BlobHandle) when they don't need the blob anymore.

Attributes

Remarks

Acquire a lease to the blob represented by blobHandle. This lease indicates to the system that the caller wants the blob to be kept around.

This is a variant of #acquireLease(BlobHandle, int, long) taking a CharSequence for description. It is highly recommended that callers only use this when a valid resource ID for description could not be provided. Otherwise, apps should prefer using #acquireLease(BlobHandle, int) which will allow description to be localized.

Any active leases will be automatically released when the blob's expiry time (BlobHandle#getExpiryTimeMillis()) is elapsed.

This lease information is persisted and calling this more than once will result in latest lease overriding any previous lease.

When an app acquires a lease on a blob, the System will try to keep this blob around but note that it can still be deleted if it was requested by the user.

Java documentation for android.app.blob.BlobStoreManager.acquireLease(android.app.blob.BlobHandle, java.lang.CharSequence, long).

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

AcquireLease(BlobHandle, Int32, Int64)

Acquire a lease to the blob represented by blobHandle.

[Android.Runtime.Register("acquireLease", "(Landroid/app/blob/BlobHandle;IJ)V", "GetAcquireLease_Landroid_app_blob_BlobHandle_IJHandler", ApiSince=30)]
public virtual void AcquireLease (Android.App.Blob.BlobHandle blobHandle, int descriptionResId, long leaseExpiryTimeMillis);
[<Android.Runtime.Register("acquireLease", "(Landroid/app/blob/BlobHandle;IJ)V", "GetAcquireLease_Landroid_app_blob_BlobHandle_IJHandler", ApiSince=30)>]
abstract member AcquireLease : Android.App.Blob.BlobHandle * int * int64 -> unit
override this.AcquireLease : Android.App.Blob.BlobHandle * int * int64 -> unit

Parameters

blobHandle
BlobHandle

the BlobHandle representing the blob that the caller wants to acquire a lease for.

descriptionResId
Int32

the resource id for a short description string that can be surfaced to the user explaining what the blob is used for.

leaseExpiryTimeMillis
Int64

the time in milliseconds after which the lease can be automatically released, in System#currentTimeMillis() timebase. If its value is 0, then the behavior of this API is identical to #acquireLease(BlobHandle, int) where clients have to explicitly call #releaseLease(BlobHandle) when they don't need the blob anymore.

Attributes

Remarks

Acquire a lease to the blob represented by blobHandle. This lease indicates to the system that the caller wants the blob to be kept around.

Any active leases will be automatically released when the blob's expiry time (BlobHandle#getExpiryTimeMillis()) is elapsed.

This lease information is persisted and calling this more than once will result in latest lease overriding any previous lease.

When an app acquires a lease on a blob, the System will try to keep this blob around but note that it can still be deleted if it was requested by the user.

In case the resource name for the descriptionResId is modified as part of an app update, apps should re-acquire the lease with the new resource id.

Java documentation for android.app.blob.BlobStoreManager.acquireLease(android.app.blob.BlobHandle, int, long).

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

AcquireLease(BlobHandle, String, Int64)

Acquire a lease to the blob represented by blobHandle.

public void AcquireLease (Android.App.Blob.BlobHandle blobHandle, string description, long leaseExpiryTimeMillis);
member this.AcquireLease : Android.App.Blob.BlobHandle * string * int64 -> unit

Parameters

blobHandle
BlobHandle

the BlobHandle representing the blob that the caller wants to acquire a lease for.

description
String

a short description string that can be surfaced to the user explaining what the blob is used for. It is recommended to keep this description brief. This may be truncated and ellipsized if it is too long to be displayed to the user.

leaseExpiryTimeMillis
Int64

the time in milliseconds after which the lease can be automatically released, in System#currentTimeMillis() timebase. If its value is 0, then the behavior of this API is identical to #acquireLease(BlobHandle, int) where clients have to explicitly call #releaseLease(BlobHandle) when they don't need the blob anymore.

Remarks

Acquire a lease to the blob represented by blobHandle. This lease indicates to the system that the caller wants the blob to be kept around.

This is a variant of #acquireLease(BlobHandle, int, long) taking a CharSequence for description. It is highly recommended that callers only use this when a valid resource ID for description could not be provided. Otherwise, apps should prefer using #acquireLease(BlobHandle, int) which will allow description to be localized.

Any active leases will be automatically released when the blob's expiry time (BlobHandle#getExpiryTimeMillis()) is elapsed.

This lease information is persisted and calling this more than once will result in latest lease overriding any previous lease.

When an app acquires a lease on a blob, the System will try to keep this blob around but note that it can still be deleted if it was requested by the user.

Java documentation for android.app.blob.BlobStoreManager.acquireLease(android.app.blob.BlobHandle, java.lang.CharSequence, long).

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