- VERSION 5.04.12

- Cambios en el manifiesto para intents desde whatsapp
This commit is contained in:
2025-04-12 20:28:47 -06:00
parent 1899de4635
commit d83f5038b8
4 changed files with 42 additions and 5 deletions

View File

@@ -87,6 +87,8 @@ Sub Class_Globals
Dim Durakelo As C_Durakelo
Dim Marquez As C_Marquez
Private l_version0 As Label
Private b_guardaRutaTodos As Button
Private b_guardaRuta As Button
End Sub
Public Sub Initialize
@@ -139,6 +141,24 @@ Sub B4XPage_Appear
If Not(in.IsInitialized) Then in = B4XPages.GetNativeParent(Me).GetStartingIntent
If Not(intentUsado) And in <> Null Then
Log(in)
' Dim action As String = in.Action
' Log("Action: " & action) ' Ej: "android.intent.action.VIEW"
' Dim uri As Object = in.GetData ' Obtiene la URI (content://...)
' Log(in.GetData)
' If uri <> Null Then
' Dim uriString As String = uri
' Log("URI: " & uriString) ' Ej: "content://com.whatsapp.provider.media/..."
' Else
' Log("El Intent no tiene URI asociada.")
' End If
' Dim mimeType As String = in.GetData
' Log("MIME Type: " & mimeType) ' Ej: "application/x-sqlite3"
' If in.HasExtra("android.intent.extra.STREAM") Then
' Dim extraUri As Object = in.GetExtra("android.intent.extra.STREAM")
' Log("Extra URI: " & extraUri) ' Ej: "content://..."
' Else
' Log("No hay extras con android.intent.extra.STREAM")
' End If
intentUsado = True
' Log(in.GetData)
If in.GetData <> Null Then
@@ -431,6 +451,7 @@ End Sub
Sub l_ruta2_LongClick
p_editaRuta.Top = l_ruta2.top
b_guardaRuta.text = $"Cambiar en "${l_ruta2.text}""$
p_editaRuta.Visible = True
End Sub
@@ -476,6 +497,22 @@ Sub b_guardaRuta_Click
p_editaRuta.Visible = False
End Sub
Private Sub b_guardaRutaTodos_Click
Log("Guardamos nueva ruta.")
If et_nuevaRuta.Text <> "" Then
skmt.ExecNonQuery($"update PEDIDO set PE_RUTA = '${et_nuevaRuta.Text}'"$)
skmt.ExecNonQuery($"update PEDIDO_CLIENTE set PC_RUTA = '${et_nuevaRuta.Text}' where PC_RUTA = '${ruta}'"$)
skmt.ExecNonQuery($"update kmt_info set CAT_CL_RUTA = '${et_nuevaRuta.Text}' where CAT_CL_RUTA = '${ruta}'"$)
Try 'Si es Guna, se pone en kmt_info2
skmt.ExecNonQuery($"update kmt_info2 set CAT_CL_RUTA = '${et_nuevaRuta.Text}' where CAT_CL_RUTA = '${ruta}'"$)
Catch
Log(LastException)
End Try
l_ruta2.Text = et_nuevaRuta.text
End If
p_editaRuta.Visible = False
End Sub
'Cambiamos el almacen actual por el especificado.
Sub b_guardaAlmacen_Click
If et_nuevoAlmacen.Text <> "" Then
@@ -988,4 +1025,4 @@ End Sub
Private Sub p_validacion_Click
p_validacion.Visible = False
End Sub
End Sub