GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV Mobile (versões anteriores)
→
[WM20] Y-a-t'il moyen de récupérer la date de compilation de l'APK ?
[WM20] Y-a-t'il moyen de récupérer la date de compilation de l'APK ?
Iniciado por Tan Trung, nov., 20 2017 11:00 AM - 2 respostas
Conecte-se…
Tan Trung
#1
Membro registado
104 mensagems
Popularité : +1 (1 vote)
Publicado em novembro, 20 2017 - 11:00 AM
Bonjour,
Existe-t'il sous WM20 une fonction qui retourne la date de compilation/génération de l'APK ?
Merci d'avance
--
NGUYEN Tan Trung
B. Rekencentra NV
Denunciar
0
0
Philippe Pasquali
#2
Membro registado
946 mensagems
Popularité : +102 (110 votes)
Publicado em novembro, 23 2017 - 3:16 PM
Bonjour
Ce code devrait vous aider
import android.content.Context;
import java.util.zip.ZipFile;
import java.util.zip.ZipEntry;
public static String getAppTimeStamp()
{
String s = "";
try{
Context context = getContexteApplication();
ApplicationInfo ai = context.getPackageManager().getApplicationInfo(context.getPackageName(), 0);
ZipFile zf = new ZipFile(ai.sourceDir);
ZipEntry ze = zf.getEntry("META-INF/MANIFEST.MF");
long time = ze.getTime();
SimpleDateFormat formatter = (SimpleDateFormat) SimpleDateFormat.getInstance();
formatter.setTimeZone(TimeZone.getTimeZone("gmt"));
s = formatter.format(new java.util.Date(time));
zf.close();
}catch(Exception e){
return s;
}
return s;
}
Denunciar
1
0
Tan Trung
#3
Membro registado
104 mensagems
Popularité : +1 (1 vote)
Publicado em novembro, 24 2017 - 8:33 AM
Merci beaucoup Philippe, je vais essayer ça tout de suite.
--
NGUYEN Tan Trung
B. Rekencentra NV
Denunciar
0
0
→ Voltar para WINDEV Mobile (versões anteriores)
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
WEBDEV (versões anteriores)
WINDEV Mobile (versões anteriores)
Reports & Queries
Off-topic
Ferramentas
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto