I am using the ImageView
to display a image with a image stored in SD card. Like this-
ImageView grp_icon=(ImageView)gridView.findViewById(R.id.grid_item_image);
BitmapFactory.Options options = new BitmapFactory.Options();
options.inPreferredConfig = Bitmap.Config.ARGB_8888;
String path="/sdcard/Letsmeet/letsmeet_media/group_images/"+gridImage[position];
Bitmap bitmap = BitmapFactory.decodeFile(path, options);
grp_icon.setImageBitmap(bitmap);
And I am trying to get the image location to display the same image in another activity by sending the location in Intent. But it gives a different location Why?
The code where I get the ImageView
image location is
String groupName=((TextView) v.findViewById(R.id.grid_item_label)).getText().toString();
ImageView grp_image=(ImageView)v.findViewById(R.id.grid_item_image);
Bitmap b=((BitmapDrawable)grp_image.getDrawable()).getBitmap();
Uri image=getImageUri(getActivity().getApplicationContext(), b);
String path=image.toString();
Intent toMangeGroup=new Intent(getActivity(),ManageGroup.class);
Bundle bundle=new Bundle();
bundle.putString("grp_name", groupName);
bundle.putString("grp_image", path);
toMangeGroup.putExtras(bundle);
startActivity(toMangeGroup);
Here I am getting the path as "content://media/external/images/media/42424"
but the actual path of the image is "/sdcard/Letsmeet/letsmeet_media/group_images/1395247992445"