- VERSION 4.10.17

- Se modificó la sección del engrane para que se pueda modificar el servidor de DBRequest.
- Se agregó en el engrane la opción de importar una base de datos desde Whatsapp.
This commit is contained in:
Jose Alberto Guerra Ugalde
2024-10-19 10:12:46 -06:00
parent 828527ea5f
commit 47a85d427d
13 changed files with 329 additions and 161 deletions

View File

@@ -171,14 +171,17 @@ Sub download_newApk
B4XPages.MainPage.muestraProgreso("Descargando nueva versión, un momento por favor.")
Dim job_newAPP As HttpJob
If job_newAPP.IsInitialized Then job_newAPP.Release
' Log(">>>> LOGIN LINK : " & Starter.newApp.appLink)
If Starter.newApp.appLink <> "" Then newApp = Starter.newApp
Log(">>>> LOGIN LINK2: " & Starter.nuevoLink)
If Starter.nuevoLink <> "" Then newApp.appLink = Starter.nuevoLink
job_newAPP.Initialize("job_newAPP",Me)
' Log(newApp.appLink & "?dummy=" & DateTime.Now)
Log(newApp.appLink & "?dummy=" & DateTime.Now)
job_newAPP.Download(newApp.appLink & "?dummy=" & DateTime.Now)
Log("Vamos a descargar: " & newApp.appLink & "?dummy=" & DateTime.Now)
Wait for (job_newAPP) JobDone (job_newAPP As HttpJob)
Private downladSuccess As Boolean = False
If job_newAPP.Success = True Then
' // Delete existing file
downladSuccess = True
If File.Exists(SharedFolder,"newapp.apk") Then
' Log(">>>>>> Borramos achivo anterior")
File.Delete(SharedFolder,"newapp.apk")
@@ -190,15 +193,25 @@ Sub download_newApk
Log("APK dir: "&SharedFolder)
End If
job_newAPP.Release
' // Install the app
Dim in As Intent
in.Initialize(in.ACTION_VIEW,"" )
SetFileUriAsIntentData(in, "newapp.apk")
' // Type must be set after calling SetFileUriAsIntentData
in.SetType("application/vnd.android.package-archive")
StartActivity(in)
n2.Cancel(nNewAppnID)
B4XPages.MainPage.ocultaProgreso
If downladSuccess Then
' // Install the app
Dim in As Intent
in.Initialize(in.ACTION_VIEW,"" )
SetFileUriAsIntentData(in, "newapp.apk")
' // Type must be set after calling SetFileUriAsIntentData
in.SetType("application/vnd.android.package-archive")
StartActivity(in)
Else
B4XPages.MainPage.principal.l_forzarActualizacion.TextColor = Colors.red
B4XPages.MainPage.principal.l_forzarActualizacion.text = "Hubo un error en la descarga, por favor revise que tenga conexion a internet e intente de nuevo."
Log("ERROR EN CONEXION")
Sleep(5000)
ExitApplication
End If
Starter.muestraProgreso = 0
B4XPages.MainPage.principal.p_transparenteActualizacion.Visible = False
' Service.StopForeground(nNewAppnID)
StopService(Me)
' CallSubDelayed(Main,"ocultaProgreso")