FOROS PROFESIONALES
WINDEV
,
WEBDEV
y
WINDEV Mobile
Inicio
|
Mensajes recientes
|
Conéctese...
|
Desconectar
|
Español
Inicio
→
WINDEV Mobile (versiones precedentes)
→
[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, 20,nov. 2017 11:00 - 2 respuestas
Conéctese…
Tan Trung
#1
Miembro registrado
104 mensajes
Popularité : +1 (1 vote)
Publicado el 20,noviembre 2017 - 11:00
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
Informar
0
0
Philippe Pasquali
#2
Miembro registrado
945 mensajes
Popularité : +102 (110 votes)
Publicado el 23,noviembre 2017 - 15:16
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;
}
Informar
1
0
Tan Trung
#3
Miembro registrado
104 mensajes
Popularité : +1 (1 vote)
Publicado el 24,noviembre 2017 - 08:33
Merci beaucoup Philippe, je vais essayer ça tout de suite.
--
NGUYEN Tan Trung
B. Rekencentra NV
Informar
0
0
→ Volver a WINDEV Mobile (versiones precedentes)
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versiones precedentes)
WEBDEV (versiones precedentes)
WINDEV Mobile (versiones precedentes)
Reports & Queries
Irrelevante
Herramientas
Français
English
Español
Portuguesa
Fermer cette fenêtre
Búsqueda Tipo
Sólo temas
Todos los mensajes
Periodo Buscar
Cualquier fecha
Última hora
Última 24 horas
Última semana
Último mes
Último año
Cancelar
Vista previa del mensaje
Añadiendo una imagen
Importar una imagen desde una URL
Enviar una imagen desde un archivo de su disco
Arrastrar un archivo o click en "Examinar..."
o
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto