Udostępnij za pośrednictwem


DocumentsProvider.CreateWebLinkIntent(String, Bundle) Method

Definition

Creates an intent sender for a web link, if the document is web linkable.

[Android.Runtime.Register("createWebLinkIntent", "(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/IntentSender;", "GetCreateWebLinkIntent_Ljava_lang_String_Landroid_os_Bundle_Handler", ApiSince=26)]
public virtual Android.Content.IntentSender? CreateWebLinkIntent (string? documentId, Android.OS.Bundle? options);
[<Android.Runtime.Register("createWebLinkIntent", "(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/IntentSender;", "GetCreateWebLinkIntent_Ljava_lang_String_Landroid_os_Bundle_Handler", ApiSince=26)>]
abstract member CreateWebLinkIntent : string * Android.OS.Bundle -> Android.Content.IntentSender
override this.CreateWebLinkIntent : string * Android.OS.Bundle -> Android.Content.IntentSender

Parameters

documentId
String

the document to create a web link intent for.

options
Bundle

additional information, such as list of recipients. Optional.

Returns

Attributes

Remarks

Creates an intent sender for a web link, if the document is web linkable.

AuthenticationRequiredException can be thrown if user does not have sufficient permission for the linked document. Before any new permissions are granted for the linked document, a visible UI must be shown, so the user can explicitly confirm whether the permission grants are expected. The user must be able to cancel the operation.

Options passed as an argument may include a list of recipients, such as email addresses. The provider should reflect these options if possible, but it's acceptable to ignore them. In either case, confirmation UI must be shown before any new permission grants are granted.

It is all right to generate a web link without granting new permissions, if opening the link would result in a page for requesting permission access. If it's impossible then the operation must fail by throwing an exception.

Java documentation for android.provider.DocumentsProvider.createWebLinkIntent(java.lang.String, android.os.Bundle).

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