문제

I wish to make option to share an image to all possible option. eg. mail, WhatsApp, Facebook etc. and I wish when the user share it there will be text addition. For example in Gmail I wish to add headline to mail before sending it, on Facebook also I would like to add text to the image. Do I need to add API to my app? Can you point me to the right direction with this.

도움이 되었습니까?

해결책

First save the image to your SD card and then use the ACTION_SEND Intent.

http://developer.android.com/reference/android/content/Intent.html#ACTION_SEND

Intent share = new Intent(android.content.Intent.ACTION_SEND);
share.setType("image/*");
share.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + pathToFile));
ctx.startActivity(Intent.createChooser(share, "Share image")); //edit text shown in dialog here
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top