Pessoal,
Estou com uma duvida que acredito que seja besta.
Estou pegando o conteúdo de um pdf, porém ele abre todo vazio.Estou com uma duvida que acredito que seja besta.
File f = new File(Environment.getExternalStorageDirectory().getPath() + "/diretorioTeste/"+ docArray[tmp].getFile().replaceAll("\\s", ""));
File dir = new File(Environment.getExternalStorageDirectory().getPath() + "/diretorioTeste/");
//dir.mkdir();
if(!f.exists() && !dir.mkdir()){
f.createNewFile();
FileOutputStream fos = new FileOutputStream(f);
fos.write(response.getBytes());
fos.flush();
fos.close();
}
PDFDecoder.decodeStream(dict, streamBuf)
Uri path = Uri.fromFile(f);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, "application/pdf");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
try {
startActivity(intent);
...
File dir = new File(Environment.getExternalStorageDirectory().getPath() + "/diretorioTeste/");
//dir.mkdir();
if(!f.exists() && !dir.mkdir()){
f.createNewFile();
FileOutputStream fos = new FileOutputStream(f);
fos.write(response.getBytes());
fos.flush();
fos.close();
}
PDFDecoder.decodeStream(dict, streamBuf)
Uri path = Uri.fromFile(f);
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(path, "application/pdf");
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
try {
startActivity(intent);
...
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.






0 comentários:
Postar um comentário