Android Java Binder gescheiterte Binder-Transaktion?

Ich versuche, ein Bild vom Dienst herunterzuladen und in der Aktivität anzuzeigen, aber ich erhalte immer

 java binder FAILED BINDER TRANSACTION

Dies ist mein Service Code

public class DownloadImageService extends Service {

@Override
public int onStartCommand(Intent intent, int flags, int startId) {
    new LoadImageAsync().execute(intent.getStringExtra("type"));
    return Service.START_NOT_STICKY;
}

@Override
public IBinder onBind(Intent intent) {
    return null;
}

private class LoadImageAsync extends AsyncTask<String, Void, String> {
    byte[] compressedImage;
    Bitmap bmp;
    String img;

    @Override
    protected void onPreExecute() {
        super.onPreExecute();
    }

    @Override
    protected String doInBackground(String... params) {

        try {
            URL url = new URL(imgUrl);
            bmp = BitmapFactory.decodeStream(url.openConnection().getInputStream());
            compressedImage = CompressBitmap.compresssImage(bmp);
            img = Base64.encodeToString(compressedImage, Base64.DEFAULT);

        } catch (IOException e) {
            compressedImage = null;
            bmp = null;
            e.printStackTrace();
        }
        return null;
    }

    @Override
    protected void onPostExecute(String s) {
        super.onPostExecute(s);
        if (compressedImage != null) {
            Intent i = new Intent(getApplicationContext(), OtherCampaignActivity.class);
            i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            i.putExtra("image_byte", img);
            startActivity(i);
        }
        stopService(new Intent(getApplicationContext(), DownloadImageService.class));
    }
}

}

Kompressionsfunktion

public static byte[] compresssImage(Bitmap b) {
    ByteArrayOutputStream stream = new ByteArrayOutputStream();
    b.compress(Bitmap.CompressFormat.PNG, 100, stream);
    byte[] compressedByteArray = stream.toByteArray();
    return compressedByteArray;
}

Meine Aktivitä

public class OtherActivity extends AppCompatActivity {
private ImageView iv;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_other);
    iv = (ImageView) findViewById(R.id.imageViewCam);
    byte[] byteArray =      Base64.decode(getIntent().getStringExtra("image_byte"), Base64.DEFAULT);
    //        byte[] byteArray = getIntent().getExtras().getByteArray("image_byte");
    Bitmap bitmap = BitmapFactory.decodeByteArray(byteArray, 0, byteArray.length);
    iv.setImageBitmap(bitmap);

}

@Override
public void onBackPressed() {
    super.onBackPressed();
    finish();
}
}

Was ist das Problem im Code. Die Aktivität startet nicht.

die App stürzt nicht ab. Ich bekomme das nur in logcat:

06-30 12:38:36.800 29992-29992/com.vt.enit E/JavaBinder﹕ !!! FAILED BINDER TRANSACTION !!!

Es liegt wahrscheinlich an einer großen Bitmap, denke ich.

Antworten auf die Frage(4)

Ihre Antwort auf die Frage