jeudi 7 mai 2015

How to share full screen image android?

I am displaying image in the view pager by fetching from the server.I am not displaying the full screen image.I have added the feature to share the image via email or many other options.

code to share image

imageView = (TouchImageView) viewpager.findViewWithTag(viewpager
            .getCurrentItem());
    imageView.setDrawingCacheEnabled(true);
    Bitmap bitmap = imageView.getDrawingCache();
    String path = Images.Media.insertImage(getContentResolver(), bitmap,
            "description", null);
    uri = Uri.parse(path);
    Intent send_report = new Intent(Intent.ACTION_SEND);
    send_report.putExtra(Intent.EXTRA_EMAIL, new String[] { "" });
    send_report.putExtra(Intent.EXTRA_SUBJECT, "Give Me That Picture");
    send_report.putExtra(Intent.EXTRA_STREAM, uri);
    send_report.putExtra(Intent.EXTRA_TEXT, "cool picture");
    send_report.setType("text/plain");
    send_report.setType("image/png");
    startActivityForResult(
    Intent.createChooser(send_report, "Choose an Email client"), 77);

But the image which is shared is not a full screen image.But i want to share the actual size image.Please help me out on this.

Aucun commentaire:

Enregistrer un commentaire