Que vol dir "el contigut de la imatge en caracters"? es ascii art? Et retorna un mime type text?
--
Hazte miembro en la web del GDG ( http://goo.gl/ngNRi ), y para no perderte nada sigue al GDG Barcelona en Google+ ( http://goo.gl/f3xo4 ), Twitter ( twitter.com/GDGBarcelona ), y su blog ( http://gdgbarcelona.blogspot.com.es/ )
---
Has recibido este mensaje porque estás suscrito al grupo "GDG Barcelona" de Grupos de Google.
Para anular la suscripción a este grupo y dejar de recibir sus correos electrónicos, envía un correo electrónico a gdg-barcelon...@googlegroups.com.
Para publicar una entrada en este grupo, envía un correo electrónico a gdg-ba...@googlegroups.com.
Para obtener más opciones, visita https://groups.google.com/groups/opt_out.
public PendingIntent pendingPictureFromBytes(byte[] data, String name) {
PendingIntent ret = null;
try {
File posterFile = new File(fileBasePath + name + ".jpg");
posterFile.createNewFile();
FileOutputStream out = new FileOutputStream(posterFile);
out.write(data);
out.flush();
out.close();
// Launch default viewer for the file
Intent dialogIntent = new Intent();
dialogIntent.setAction(android.content.Intent.ACTION_VIEW);
dialogIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
Uri my_uri = Uri.parse("file://" + posterFile.getAbsolutePath());
dialogIntent.setDataAndType(my_uri, "image/*");
ret = PendingIntent.getActivity(this, 0, dialogIntent, 0);
}
catch (Exception ex)
{
// LOG FAIL
}
return ret;
}