mirror of
https://github.com/KeymonSoft/Guna_Preventa.git
synced 2026-04-19 21:59:15 +00:00
- VERSION 4.11.14
- Se puso el código de la bitacora en un clase para que sea mas fácil portarla a otras aplicaciones.
This commit is contained in:
@@ -121,41 +121,41 @@ Sub Service_Start (StartingIntent As Intent)
|
||||
B4XPages.MainPage.muestraProgreso("Buscando actualizaciones, un momento por favor.")
|
||||
Log("Buscando actualización")
|
||||
fileProvider_init
|
||||
' Wait For (Download(Me, lnk)) JobDone (j As HttpJob)
|
||||
' If j.Success Then
|
||||
' Try
|
||||
' Dim app() As String = Regex.Split(Chr(9),j.GetString)
|
||||
' ' // Set the data
|
||||
' newApp.appLink = app(3) 'Liga a nueva app
|
||||
' newApp.newMsg = app(1) 'Texto de que hay actualizacion
|
||||
' newApp.okMsg = app(2) 'Texto de app al corriente
|
||||
' newApp.version = app(0) 'Version actual
|
||||
'
|
||||
' Log($"Application.VersionName=${Application.VersionName}, newApp=${newApp}"$)
|
||||
'
|
||||
' ' // App version check
|
||||
' If newApp.version = Application.VersionName Then
|
||||
' newApp.update = False
|
||||
' Log("No new app")
|
||||
' B4XPages.ShowPage("updateAvailable")
|
||||
' 'Se puede mandar tambien una notificacion avisando que NO hay actualizaciones
|
||||
'' CreateNotification2("Aplicacion al corriente","No hay actualizaciones disponibles","ic_file_download_white_24dp",Main,True,True,nNewApp,nNewAppnID)
|
||||
' End If
|
||||
' If newApp.version <> Application.VersionName Then
|
||||
' newApp.update = True
|
||||
' Log("New app true")
|
||||
' B4XPages.ShowPage("updateAvailable")
|
||||
' 'Se puede mandar tambien una notificacion avisando que hay actualizacion disponible
|
||||
'' CreateNotification2("Nueva aplicación disponible","Haga clic para descargar.","ic_file_download_white_24dp",C_UpdateAvailable,True,True,nNewApp,nNewAppnID)
|
||||
' End If
|
||||
' Catch
|
||||
' Log("appUpdater(), Job Failed, error " & LastException.Message)
|
||||
' End Try
|
||||
' Else
|
||||
' Log("appUpdater(), Job Failed " & lnk)
|
||||
' End If
|
||||
' j.Release
|
||||
' StopService(Me)
|
||||
Wait For (Download(Me, lnk)) JobDone (j As HttpJob)
|
||||
If j.Success Then
|
||||
Try
|
||||
Dim app() As String = Regex.Split(Chr(9),j.GetString)
|
||||
' // Set the data
|
||||
newApp.appLink = app(3) 'Liga a nueva app
|
||||
newApp.newMsg = app(1) 'Texto de que hay actualizacion
|
||||
newApp.okMsg = app(2) 'Texto de app al corriente
|
||||
newApp.version = app(0) 'Version actual
|
||||
|
||||
Log($"Application.VersionName=${Application.VersionName}, newApp=${newApp}"$)
|
||||
|
||||
' // App version check
|
||||
If newApp.version = Application.VersionName Then
|
||||
newApp.update = False
|
||||
Log("No new app")
|
||||
B4XPages.ShowPage("updateAvailable")
|
||||
'Se puede mandar tambien una notificacion avisando que NO hay actualizaciones
|
||||
' CreateNotification2("Aplicacion al corriente","No hay actualizaciones disponibles","ic_file_download_white_24dp",Main,True,True,nNewApp,nNewAppnID)
|
||||
End If
|
||||
If newApp.version <> Application.VersionName Then
|
||||
newApp.update = True
|
||||
Log("New app true")
|
||||
B4XPages.ShowPage("updateAvailable")
|
||||
'Se puede mandar tambien una notificacion avisando que hay actualizacion disponible
|
||||
' CreateNotification2("Nueva aplicación disponible","Haga clic para descargar.","ic_file_download_white_24dp",C_UpdateAvailable,True,True,nNewApp,nNewAppnID)
|
||||
End If
|
||||
Catch
|
||||
Log("appUpdater(), Job Failed, error " & LastException.Message)
|
||||
End Try
|
||||
Else
|
||||
Log("appUpdater(), Job Failed " & lnk)
|
||||
End If
|
||||
j.Release
|
||||
StopService(Me)
|
||||
End Sub
|
||||
|
||||
Sub download_Start (StartingIntent As Intent)
|
||||
|
||||
Reference in New Issue
Block a user