1

I am sharing an image to different apps using an intent as ACTION_SEND, but I also want to add an option of "Save image to gallery", in the same menu.

Is there any way to do it ? Please help me somebody. Thanks in advance.

1 Answers1

0

you have to create custom dialog for that. add all ACTION_SEND items to your list and "save image to gallery" option also. put this listview in some dialog.

refer this :

https://github.com/soarcn/BottomSheet

use this code to get available items of ACTION_SEND

    Intent galleryIntent = new Intent(Intent.ACTION_SEND);
    List<ResolveInfo> listGel = context.getPackageManager().queryIntentActivities(galleryIntent, 0);
    for (ResolveInfo res : listGel) {
        Log.e("package",res.activityInfo.packageName);
        Log.e("name",res.activityInfo.name);
        Log.e("proname",res.loadLabel(context.getPackageManager()).toString());


    }
Ravi
  • 34,851
  • 21
  • 122
  • 183