Zwracanie obrazu do WhatsApp

Próbowałem zbudować aplikację, która pojawia się jako opcjonalne źródło obrazu, gdy użytkownik próbuje udostępnić obraz za pomocą WhatsApp. Do tej pory udało mi się wyświetlić moją aplikację w selektorze usług, który uruchamia WhatsApp za pomocą zamierzonych filtrów, ale nie mogę uzyskać obrazu, aby poprawnie powrócił do WhatsApp. Poniżej zamieszczam mój kod:

public void returnImage(View v){
    //Bitmap img;
    //Bundle selectedImage = new Bundle();
    Uri imageURI;
    Intent shareIntent = new Intent();
    switch(v.getId()){
    case R.id.eric1 :
        imageURI =  saveToCache(R.drawable.cartman1);
        shareIntent.putExtra(Intent.EXTRA_STREAM, imageURI);
        shareIntent.setType("image/png");
        setResult(RESULT_OK, shareIntent);
        Utils.makeToast("Selected",this);
        System.out.println("--------------------------------");
        System.out.println(imageURI.toString());
        finish();
    }
}

   private Uri saveToCache(int resID) {
    // TODO Auto-generated method stub
    Bitmap image = BitmapFactory.decodeResource(getResources(), resID);
    File imageFile;
    Date d = new Date();
    String imgName = ((Long.toString(d.getTime())).subSequence(1,
            9)).toString();
    String state = Environment.getExternalStorageState();
    printDebug(state);
    if (Environment.MEDIA_MOUNTED.equals(state)) {
        File file = getExternalFilesDir(null);
        if (file != null) {
            try {
                //String root = file.getAbsolutePath();
                imageFile = new File(file, imgName+".png");
                printDebug(imageFile.getAbsolutePath());
                FileOutputStream stream = new FileOutputStream(imageFile);
                boolean complete = image.compress(Bitmap.CompressFormat.PNG, 100, 
                    stream);
                if (!complete) {
                    Log.d("tag", "image not saved");
                }
                Log.d("tag", "image saved");
                // Tell the media scanner about the new file so that it is
                // immediately available to the user.
                MediaScannerConnection.scanFile(this,
                        new String[] { imageFile.toString() }, null,
                        new MediaScannerConnection.OnScanCompletedListener() {
                    public void onScanCompleted(String path, Uri uri) {
                        Log.i("ExternalStorage", "Scanned " + path + ":");
                        Log.i("ExternalStorage", "-> uri=" + uri);
                    }
                });

                return Uri.parse(imageFile.getAbsolutePath());
            } catch (IOException e) {
                Log.d("tag", "Can't save image", e);
            }
        }
    }
    return null;
    }

Aplikacja otwiera się i wybieram obraz, ale WhatsApp informuje, że nie można udostępnić obrazu. LogCat nie pokazuje żadnych błędów ani ostrzeżeń.

Przeczytałem zasóbFiltr intencji dla Whatsapp -> dziel się obrazem

ale nie ma żadnej wzmianki o tym, jak lub co zostało zwrócone przez aplikację, więc jestem tutaj całkowicie pozbawiony.

questionAnswers(2)

yourAnswerToTheQuestion