/// <summary> /// Gets an <see cref="Android.Content.Intent"/> that can be used to start the share activity. /// </summary> /// <returns> /// The <see cref="Android.Content.Intent"/>. /// </returns> /// <param name='activity'> /// The <see cref="Android.App.Activity"/> that will invoke the returned <see cref="Android.Content.Intent"/>. /// </param> /// <param name='item'> /// The item to share. /// </param> /// <param name='completionHandler'> /// Handler called when the share UI has finished. /// </param> public virtual ShareUIType GetShareUI(UIContext activity, Item item, Action <ShareResult> completionHandler) { var intent = new Android.Content.Intent(activity, typeof(ShareActivity)); var state = new ShareActivity.State { Service = this, Item = item, CompletionHandler = completionHandler, }; intent.PutExtra("StateKey", ShareActivity.StateRepo.Add(state)); return(intent); }
/// <summary> /// Gets an <see cref="Android.Content.Intent"/> that can be used to start the share activity. /// </summary> /// <returns> /// The <see cref="Android.Content.Intent"/>. /// </returns> /// <param name='activity'> /// The <see cref="Android.App.Activity"/> that will invoke the returned <see cref="Android.Content.Intent"/>. /// </param> /// <param name='item'> /// The item to share. /// </param> /// <param name='completionHandler'> /// Handler called when the share UI has finished. /// </param> public virtual ShareUIType GetShareUI (UIContext activity, Item item, Action<ShareResult> completionHandler) { var intent = new Android.Content.Intent (activity, typeof (ShareActivity)); var state = new ShareActivity.State { Service = this, Item = item, CompletionHandler = completionHandler, }; intent.PutExtra ("StateKey", ShareActivity.StateRepo.Add (state)); return intent; }