Tema: [ CONSULTA ] Itext put extra
Ver Mensaje Individual
  #1  
Viejo 01/01/17, 12:35:36
Array

[xs_avatar]
Merche300 Merche300 no está en línea
Betatester oficial
 
Fecha de registro: dic 2008
Localización: Valencia
Mensajes: 625
Modelo de smartphone: NEXUS 5 - ONEPLUS 3
Tu operador: Pepephone
Itext put extra

Buenos dias, veran tengo un problema con putExtra, el caso es que quiero pasar una imagen de in activiy a otra y no hay manera:

1ª activity,

Código:
        Bitmap bitmap = BitmapFactory.decodeResource
                (getResources(), R.drawable.trinity); // your bitmap
        ByteArrayOutputStream bs = new ByteArrayOutputStream();
        bitmap.compress(Bitmap.CompressFormat.JPEG, 50, bs);
        pdf.putExtra("check", bs.toByteArray());

        startActivity(pdf);
    }
y en la segunda, la que quero recoger los datos que es itext, para crear un .pdf

Código:
 if(getIntent().hasExtra("byteArray")) {
                ImageView imv= new ImageView(this);
                Bitmap bitmap = BitmapFactory.decodeByteArray(
                        getIntent().getByteArrayExtra("byteArray"), 0, getIntent().getByteArrayExtra("check").length);
                imv.setImageBitmap(bitmap);
            }

            cabecera.add(String.valueOf(getIntent().getByteArrayExtra("byteArray")));
El caso es que el resultado es un texto como ese, [B@eacc9c1

¿Que hago mal?

Última edición por Merche300 Día 01/01/17 a las 13:21:34.
Responder Con Cita