• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps How to guide needed for sharing images from an gridview app

Thank you for your answer i made it now working over that way:


public class FullImageActivity extends Activity {



@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.full_image);

// get intent data
Intent i = getIntent();

// Selected image id
int position = i.getExtras().getInt("id");
ImageAdapter imageAdapter = new ImageAdapter(this);

ImageView imageView = (ImageView) findViewById(R.id.full_image_view);
imageView.setImageResource(imageAdapter.mThumbIds[position]);
BitmapDrawable bm = (BitmapDrawable) imageView.getDrawable();
Bitmap mysharebmp = bm.getBitmap();
String path = Images.Media.insertImage(getContentResolver(),
mysharebmp, "MyImage", null);
Uri uri = Uri.parse(path);
Intent sharingIntent = new Intent(Intent.ACTION_SEND);
sharingIntent.setType("image/*");
sharingIntent.putExtra(Intent.EXTRA_STREAM, uri);
startActivity(Intent.createChooser(sharingIntent,
"Share image using"));
}



}


My 2 problems now are how can i get easy share menu instead of the autostart share and how do i delete the image -->
because now when i open a pic in fullscreen with that activity it
 
Back
Top Bottom