다음을 통해 공유


ShareActionProvider.SetShareIntent(Intent) 메서드

정의

공유 작업에 대한 정보를 사용하여 의도를 설정합니다.

[Android.Runtime.Register("setShareIntent", "(Landroid/content/Intent;)V", "GetSetShareIntent_Landroid_content_Intent_Handler")]
public virtual void SetShareIntent (Android.Content.Intent? shareIntent);
[<Android.Runtime.Register("setShareIntent", "(Landroid/content/Intent;)V", "GetSetShareIntent_Landroid_content_Intent_Handler")>]
abstract member SetShareIntent : Android.Content.Intent -> unit
override this.SetShareIntent : Android.Content.Intent -> unit

매개 변수

shareIntent
Intent

공유 의도입니다.

특성

설명

공유 작업에 대한 정보를 사용하여 의도를 설정합니다. 다음은 공유 의도를 생성하기 위한 샘플입니다.

Intent shareIntent = new Intent(Intent.ACTION_SEND);
            shareIntent.setType("image/*");
            Uri uri = Uri.fromFile(new File(getFilesDir(), "foo.jpg"));
            shareIntent.putExtra(Intent.EXTRA_STREAM, uri);

에 대한 android.widget.ShareActionProvider.setShareIntent(android.content.Intent)Java 설명서

이 페이지의 일부는 Android 오픈 소스 프로젝트에서 만들고 공유하고 Creative Commons 2.5 특성 라이선스에 설명된 용어에 따라 사용되는 작업을 기반으로 하는 수정 사항입니다.

적용 대상

추가 정보