From 0ddb35fb073ea7d07bc71e0fa7c9bc663f81ad4b Mon Sep 17 00:00:00 2001 From: Jose Alberto Guerra Ugalde Date: Fri, 11 Jul 2025 14:47:48 -0600 Subject: [PATCH] - VERSION 5.07.07 - Se hicieron cambios en el codigo de la geocerca en cliente. --- B4A/C_Cliente.bas | 6 +++++- B4A/Files/cliente.bal | Bin 38501 -> 38928 bytes B4A/Mariana.b4a | 2 +- B4A/Mariana.b4a.meta | 8 ++++---- B4A/Subs.bas | 21 +++++++++++++++++++-- 5 files changed, 29 insertions(+), 8 deletions(-) diff --git a/B4A/C_Cliente.bas b/B4A/C_Cliente.bas index 294f522..ee972bc 100644 --- a/B4A/C_Cliente.bas +++ b/B4A/C_Cliente.bas @@ -150,6 +150,7 @@ Sub Class_Globals Private p_passGeocerca As Panel Private b_passGeocerca As Button Private et_passGeocerca As EditText + dim l_geoAlmacen As Label End Sub 'You can add more parameters here. @@ -212,6 +213,8 @@ End Sub Sub B4XPage_Appear distance = 500000000000 + B4XPages.MainPage.lon_gps = 0 + B4XPages.MainPage.lat_gps = 0 B4XPages.mainpage.pantallaActual = Root b_noVenta.Enabled = True b_venta.Enabled = True @@ -381,6 +384,7 @@ Sub B4XPage_Appear b_venta.Visible = False b_noVenta.Visible = False End If + Subs.estamosEnAlmacen(50) End Sub Sub GPS_LocationChanged (Location1 As Location) @@ -1080,7 +1084,7 @@ End Sub Private Sub b_passGeocerca_Click Log("b_passGeocerca clicked") - ToastMessageShow("¡Un momento por favor!", false) + ToastMessageShow("¡Un momento por favor!", False) b_passGeocerca.Enabled = False If et_passGeocerca.Text.Trim = "KMTS1" Then ToastMessageShow("¡¡Listo!!", False) diff --git a/B4A/Files/cliente.bal b/B4A/Files/cliente.bal index d22b8a409bdab20f6916719a9e5a80c43be77960..f10e6682dc581617d78a1a96db28717aa6fcfe83 100644 GIT binary patch delta 885 zcmZXSUq}=|9LHzo?(%kB_1L?##5~Q*4)0FS(4@dfRItoE&91b}KbJ_MR#Xp?_@@X_ z{FC?X2n0)lgd*sUeTeMOQ@sSq`4aR{Z$1Wr4^me4TS;7N;WP7@@62y@cG#t-;!ac~ zSr}uFB*tXwL$RcCVN=MuS~@!}m34Kug*tk)fS41!URyD*ih&%ObP?6WF`|YzPM8QY zQA-4fI-=g-Ck)eO?xiIl~h4t(Z2t#WjM9LCx$o{5BjyFirbPrPa8OCEq9=- z$gRDt8BgK!aPCRRY&cE3)od1q;fof zYrS!Z^Cj&;-#vwY$6~OL{{SzwhdUF{TIWLT5tV}M#(WHxs+cY>vxhf!kJ6#C^nTWY=*C4rrS%c(_M)V_BQkDXNidqJ_90$rK433pcCK7j70-jzW(U y-hLnU!ez5=*~-EZ^Vl)l-;Ow4g+F%(uH1dcC6q)0HtFA`Uws)E$dm9Y^7s!V*~W4J delta 654 zcmY+BPe{{Y7{}k|-G1!%o7)^~7S=3kMKqOWLMMYFA55Sn@*RDGzlvFLmo6c#t}l_&0lgE9muw&-;Ad=g-RvZ|Kg zPZici0*GbPCBL~@+5>w6%h_{=AR!25E_7y(vlR^4Ul+7n>{<;=2~%8Uyj#1NPKVK# z`zR&hb5ErmE@bO5lP^d|G2?gq8}t+hxZa;Xf$6Rw7Do%xNvMmIqvh;*zjI$755I~W zlLn0rH6S{c#C-(uqu-0!u{h@8BL{ph*AYz^NF5I$H2#TPSQ&3Eb?v_fmnN3}05JBM AyZ`_I diff --git a/B4A/Mariana.b4a b/B4A/Mariana.b4a index d460e16..b090e5e 100644 --- a/B4A/Mariana.b4a +++ b/B4A/Mariana.b4a @@ -199,7 +199,7 @@ Version=12.8 #Region Project Attributes #ApplicationLabel: Mariana #VersionCode: 1 - #VersionName: 5.07.05 + #VersionName: 5.07.07 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: portrait #CanInstallToExternalStorage: False diff --git a/B4A/Mariana.b4a.meta b/B4A/Mariana.b4a.meta index cfd9cc1..7c48184 100644 --- a/B4A/Mariana.b4a.meta +++ b/B4A/Mariana.b4a.meta @@ -79,15 +79,15 @@ ModuleClosedNodes24= ModuleClosedNodes25= ModuleClosedNodes26= ModuleClosedNodes27=2,3,4,5,6,7,8,10,11,12,13,14 -ModuleClosedNodes28= +ModuleClosedNodes28=2 ModuleClosedNodes29= ModuleClosedNodes3= -ModuleClosedNodes4=2,4,10,23,24,25,26,27,28,29,30,31,32,33,34,35,37,38,39,40,41,42,44,45 +ModuleClosedNodes4=4 ModuleClosedNodes5= ModuleClosedNodes6= ModuleClosedNodes7= ModuleClosedNodes8= ModuleClosedNodes9= -NavigationStack=C_Cliente,B4XPage_Appear,349,6,Tracker,CreateLocationRequest,121,0,Tracker,CreateLocationRequestSmallD,138,0,C_Cliente,GPS_LocationChanged,438,6,C_Cliente,ListView1_ItemLongClick,448,0,Starter,ENVIA_ULTIMA_GPS,100,0,Starter,timerRecordatorio_Tick,163,0,C_Cliente,p_transparenteGeocerca_Click,1072,1,C_Cliente,b_passGeocerca_Click,1076,6,C_Cliente,JobDone,994,1 +NavigationStack=Subs,estamosEnAlmacen,1446,6,B4XMainPage,i_engrane_LongClick,814,0,Main,Process_Globals,21,0,Main,Activity_ActionBarHomeClick,35,0,Main,Activity_Create,27,0,B4XMainPage,Class_Globals,22,0,B4XMainPage,B4XPage_Appear,305,0,Diseñador Visual,cliente.bal,-100,6,B4XMainPage,B4XPage_Created,295,0,Main,Activity_Pause,49,0 SelectedBuild=0 -VisibleModules=27,2,12,4,28,29 +VisibleModules=27,2,12,4,28,29,17 diff --git a/B4A/Subs.bas b/B4A/Subs.bas index 4f66146..4f9f226 100644 --- a/B4A/Subs.bas +++ b/B4A/Subs.bas @@ -90,6 +90,20 @@ Sub notiHigh(title As String, body As String, activity As Object) 'ignore notif.Notify(777) End Sub +'Regresa el objeto de una notificacion con importancia baja +Sub notiLow(title As String, Body As String, activity As Object) ' As Notification 'ignore + Private notification As Notification + notification.Initialize2(notification.IMPORTANCE_LOW) + notification.Icon = "icon" + notification.Sound = False + notification.Vibrate = False + notification.SetInfo(title, Body, activity) + notification.Notify(777) +' Log("notiLowReturn: "&title) +' Log("notiLowReturn SetInfo") +' Return notification +End Sub + 'Regresa el objeto de una notificacion con importancia baja Sub notiLowReturn(title As String, Body As String, id As Int) As Notification 'ignore Private notification As Notification @@ -1426,9 +1440,12 @@ Sub estamosEnAlmacen(rango As Int) As Boolean ' Log($"Coordenadas del almacen - lat:${latAlmacen}, lon:${lonAlmacen}"$) l2.Initialize2(latAlmacen, lonAlmacen) Dim distance As Long = l1.DistanceTo(l2) 'the result is in meters -' Log(distance) + Log(distance) +' If distance < 100 Then ToastMessageShow("Distancia a almacen: " & distance, False) + notiHigh("Mariana", "Distancia a almacen: " & distance, Main) + B4XPages.MainPage.cliente.l_geoAlmacen.text = $"Almacen a ${distance}"$ If distance <= rango Then res = True -' Log("Dentro del almacen: " & res) + Log("Dentro del almacen: " & res) Catch Log(LastException) End Try