ShareActionProvider.IOnShareTargetSelectedListener.OnShareTargetSelected Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Called when a share target has been selected.
[Android.Runtime.Register("onShareTargetSelected", "(Landroid/widget/ShareActionProvider;Landroid/content/Intent;)Z", "GetOnShareTargetSelected_Landroid_widget_ShareActionProvider_Landroid_content_Intent_Handler:Android.Widget.ShareActionProvider/IOnShareTargetSelectedListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public bool OnShareTargetSelected (Android.Widget.ShareActionProvider? source, Android.Content.Intent? intent);
[<Android.Runtime.Register("onShareTargetSelected", "(Landroid/widget/ShareActionProvider;Landroid/content/Intent;)Z", "GetOnShareTargetSelected_Landroid_widget_ShareActionProvider_Landroid_content_Intent_Handler:Android.Widget.ShareActionProvider/IOnShareTargetSelectedListenerInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member OnShareTargetSelected : Android.Widget.ShareActionProvider * Android.Content.Intent -> bool
Parameters
- source
- ShareActionProvider
The source of the notification.
- intent
- Intent
The intent for launching the chosen share target.
Returns
The return result is ignored. Always return false for consistency.
- Attributes
Remarks
Called when a share target has been selected. The client can decide whether to perform some action before the sharing is actually performed.
<strong>Note:</strong> Modifying the intent is not permitted and any changes to the latter will be ignored.
<strong>Note:</strong> You should <strong>not</strong> handle the intent here. This callback aims to notify the client that a sharing is being performed, so the client can update the UI if necessary.
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.