title: How solve this type error "The File formate is not supported" when sharing images to whatsapp?
body: <p>I am implementing one app to share images to whatsapp when clicking on "share button" and according to this project i created one Imageadapter that extend Baseadapter and one activity for sharing images.So,When i am clicking on "Share button" it should generate "The file formate is not supported".</p>
  
  <p><strong>ImageAdapter.java</strong></p>
  
  <pre><code>public class ImageAdapter extends BaseAdapter {
  
  private Context mContext;
  public int getCount() {
      return mThumbIds.length;
  }
  public Object getItem(int position) {
      return mThumbIds[position];
  }
  public long getItemId(int position) {
      return 0;
  }
  public ImageAdapter(Context c) {
      mContext = c;
  }
  
  public View getView(final int position, View convertView, ViewGroup parent) {
      ImageView imageView;
      if (convertView == null){
          imageView = new ImageView(mContext);
          imageView.setLayoutParams(new GridView.LayoutParams(80, 80));
          imageView.setScaleType(ImageView.ScaleType.CENTER_CROP);
          imageView.setPadding(15, 15, 15, 15);
          imageView.setOnClickListener(new View.OnClickListener() {
              @Override
              public void onClick(View v) {
  
                  Intent intent = new Intent(mContext,FullScreenImage.class);
                  intent.putExtra("imageID", mThumbIds[position]);
                  mContext.startActivity(intent);
              }
          });
  
  
      }
      else{
          imageView = (ImageView) convertView;
      }
      imageView.setImageResource(mThumbIds[position]);
      return imageView;
  }
  
  private Integer[] mThumbIds = {
          R.mipmap.h1, R.mipmap.h2,
          R.mipmap.h3, R.mipmap.h4,
          R.mipmap.h5,R.mipmap.h6,
          R.mipmap.h7,R.mipmap.h8
          ,R.mipmap.h9,R.mipmap.h10
          ,R.mipmap.h11,R.mipmap.h12
          ,R.mipmap.h13,R.mipmap.h14
          ,R.mipmap.h15
  };
  }
  </code></pre>
  
  <p><strong>FullScreenImage.java</strong></p>
  
  <pre><code>public class FullScreenImage extends Activity {
  
  
  ImageView imageView,imgBack;
  Button setWallpaper,share;
  Context activity;
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.layout_fullscreen_image);
  
      //Get image fro Image adapter
      Bundle bdl = getIntent().getExtras();
      final int imageRes = bdl.getInt("imageID");
  
      //Setting up imageview
      imageView = (ImageView)findViewById(R.id.imgDisplay);
  
      //Share image to whatsapp
      share = (Button)findViewById(R.id.btnShare);
      share.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              Uri imageUri = Uri.parse("android.resource://com.v1.sensoft.halloween/mipmap"+imageRes);
              Intent intent = new Intent(Intent.ACTION_SEND);
              intent.setType("image/*");
  
              intent.putExtra(Intent.EXTRA_STREAM, imageUri);
              startActivity(Intent.createChooser(intent , "Share"));
          }
  
      });
  
      //Setting up wallpaper
      ImageView image = (ImageView) findViewById(R.id.imgDisplay);
      image.setImageResource(imageRes);
  
      setWallpaper = (Button)findViewById(R.id.setWall);
      setWallpaper.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              WallpaperManager myWallpaperManager
                      = WallpaperManager.getInstance(getApplicationContext());
              try {
                  myWallpaperManager.setResource(imageRes);
                  Context context = getApplicationContext();
                  // Create layout inflator object to inflate toast.xml file
                  LayoutInflater inflater = getLayoutInflater();
  
                  // Call toast.xml file for toast layout
                  View toastRoot = inflater.inflate(R.layout.layout_toast2, null);
  
                  Toast toast = new Toast(context);
  
                  // Set layout to toast
                  toast.setView(toastRoot);
                  toast.setGravity(Gravity.CENTER_HORIZONTAL | Gravity.CENTER_VERTICAL,
                          0,0 );
                  toast.setDuration(Toast.LENGTH_LONG);
                  toast.show();
              } catch (IOException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
          }
      });
  
  
      //Header back button...for Mainactivity.java
      imgBack = (ImageView)findViewById(R.id.imgBack);
      imgBack.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
  
              Intent intentLog9 = new Intent(getApplicationContext(), MainActivity.class);
              startActivity(intentLog9);
              finish();
          }
      });
  
  }
  }
  </code></pre>
  
  <p>If anyone know what is the problem plz tell me.
  Thanks in advance...</p>