Tecnologia do Blogger.
RSS

Re: [androidbrasil-dev] Tamanho do arquivo apk

public int getContentLength ()

Added in API level 1

Returns the content length in bytes specified by the response header field content-length or -1 if this field is not set.

Returns
  • the value of the response header field content-length.

Lúcio Maciel
luciofm@gmail.com


2013/4/23 Derci Santos <derciii.lima@gmail.com>
Olá pessoal,

Seguinte, estou fazendo o download de um arquivo apk para fazer a atualização do sistema. Estou seguindo o seguinte tópico: http://stackoverflow.com/questions/3028306/download-a-file-with-android-and-showing-the-progress-in-a-progressdialog porém na linha "int fileLength = connection.getContentLength();" está retornando -1 ao invés do tamanho do arquivo. O que fazer pra resolver esse problema?

Grato.
--
 
Att,
Derci Santos

Recomendação se for reenviar esta mensagem, por favor:

1. Apague o MEU endereço eletrônico e todos os outros constantes do e-mail;
2. Encaminhe como CÓPIA OCULTA (Cco ou Bcc) aos seus destinatários.
3. Agindo desta forma, você estará colaborando para dificultar a disseminação de vírus e spams, e também para tornar a internet mais segura.

--
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.
 
 

--
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.
 
 

  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comentários:

Postar um comentário