示例#1
0
        public static void Share(Context context, Bitmap bitmap, string bitmapSavePath, string title, string subject, string message)
        {
            bitmap.SaveToFile(bitmapSavePath);

            Intent i = new Intent(Intent.ActionSend);
            i.SetType("image/png");
            i.PutExtra(Intent.ExtraSubject, subject);
            i.PutExtra(Intent.ExtraText, message);
            File f = new File(bitmapSavePath);
            i.PutExtra(Intent.ExtraStream, Uri.FromFile(f));

            context.StartActivity(Intent.CreateChooser(i, title));
        }