How to get all installed app in share intent dailog?

تعرفه تبلیغات در سایت
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس
عنوان عکس عنوان عکس عنوان عکس عنوان عکس

آرشیو مطالب

جستجوگر

یافته ها در جستجو

    امکانات وب

    برچسب ها

    Vote count: 0

    I am trying to share image using share intent to already installed app, but when i try to share it shows only whtsapp application instead of all the installed apps.can any one help me to get all the installed apps to share my image.

     View content = view.findViewById(R.id.imageView3);
                    content.setDrawingCacheEnabled(true);
    
                    Bitmap bitmap = content.getDrawingCache();
                    File root = Environment.getExternalStorageDirectory();
                    File cachePath = new File(root.getAbsolutePath() + "/DCIM/Camera/image.jpg");
                    try {
                        cachePath.createNewFile();
                        FileOutputStream ostream = new FileOutputStream(cachePath);
                        bitmap.compress(Bitmap.CompressFormat.JPEG, 100, ostream);
                        ostream.close();
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
    
    
    
                    final Intent emailIntent = new Intent(Intent.ACTION_SEND);
                    emailIntent.setType("text/plain");
                    emailIntent.putExtra(Intent.EXTRA_SUBJECT, getString(R.string.app_name));
                    emailIntent.putExtra(Intent.EXTRA_TEXT, "Text to share");
                    emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(cachePath)); //............Pass Image URI here.........
                    emailIntent.setType("image/*");
                    emailIntent.setPackage("com.whatsapp");
                    startActivity(Intent.createChooser(emailIntent, "Share..."));
    
    asked 58 secs ago

  • مطالب مرتبط
  • displaying runtime errors in android/ios installed app
  • Sharepoint cloud form support
  • Need a little help adding a table range from an excel file on sharepoint to an email body with powershell
  • How to save resource of ImageButton in shared preference?
  • How and what to code in java to share data locally between 2 connected devices through java?
  • Spark and huge shared objects
  • نویسنده : استخدام کار بازدید : 60 تاريخ : دوشنبه 1 خرداد 1396 ساعت: 13:03
    برچسب‌ها :