0

AddThis.shareItem(this,"facebook",mShareTitle,mShareDescription,myBitmap); を使用して写真を共有しようとしています。しかし、「FAILED BINDER TRANSACTION !!!」という 1MB のバッファ エラーが常に発生します。またはFacebookの「エラーは後で試してください」。

誰かがこれを回避する方法を知っていますか? (ビットマップを共有する前にバッファをクリーニングするかもしれませんか?)。

AddThis.shareItem(this,"facebook",mShareTitle,mShareDescription,myBitmap); を除いて、すべてのコードは正常に動作します。部。

ありがとう!

String imageURL= " "; //contains the path of the image on device
File imgFile = new  File(imageURL);


if(imgFile.exists()){
            Log.d(TAG, "imgFile.getAbsolutePath() " + imgFile.getAbsolutePath());
            Bitmap myBitmap = BitmapFactory.decodeFile(imgFile.getAbsolutePath());try {

                    //This is what I found in http://support.addthis.com/ and works everywhere except on facebook
                    AddThis.shareItem(this, "facebook",mShareTitle,mShareDescription,myBitmap);                 
                    //Sharing from web works fine
                    AddThis.shareItem(this, "facebook", "http://example.jpg" , mShareTitle, mShareDescription);
                    //I've tried this but it's not working 
                    AddThis.shareItem(this, "facebook", "imgFile.getAbsolutePath()", mShareTitle, mShareDescription);
                    //I've read something about avoid buffer using Uris, but I'm not doing it appropiately
                    AddThis.shareItem(this, "facebook", "Uri.fromFile(imgFile).getPath()", mShareTitle, mShareDescription);
                    //I've read something about avoid buffer using Uris, but I'm not doing it appropiately
                    AddThis.shareItem(this, "facebook", imageURL, mShareTitle, mShareDescription);
                    //Last try that doesn't work
                    String foo = "file://";
                    foo = foo.concat(imgFile.getAbsolutePath());
                    Log.d(TAG,"foo: "+foo);
                    Log.d(TAG,"imageURL: "+imageURL);
                    AddThis.shareItem(this, "facebook", "foo", mShareTitle, mShareDescription);                 

                } catch (ATDatabaseException e) {
                    e.printStackTrace();
                    Log.e(TAG, "ATDatabaseException: " + e);
                } catch (ATSharerException e) {
                    e.printStackTrace();
                    Log.e(TAG, "ATSharerException: " + e);

                }

            }
            else
                Log.d(TAG, "Image not found");

        }   
4

0 に答える 0