mirror of
https://github.com/KeymonSoft/Salma_Venta-DESCONTINUADO.git
synced 2026-04-17 21:06:20 +00:00
- VERSION 4.12.09
- Se cambiaron los permisos de Activity a B4XPage
This commit is contained in:
@@ -246,7 +246,7 @@ Sub B4XPage_Appear
|
||||
LogColor($"////////////////// DeviceID: ${DeviceID} ////////////////// "$, Colors.Blue)
|
||||
LogColor("Revisa permisos Phone_State", Colors.Green)
|
||||
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_READ_PHONE_STATE)
|
||||
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
|
||||
Wait For B4XPage_PermissionResult (Permission As String, Result As Boolean)
|
||||
If Result Then
|
||||
IMEN.Text = Phn.GetDeviceId
|
||||
IMEI = Phn.GetDeviceId
|
||||
@@ -254,7 +254,7 @@ Sub B4XPage_Appear
|
||||
IMEI="" 'Pruebas
|
||||
End If
|
||||
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_ACCESS_FINE_LOCATION)
|
||||
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
|
||||
Wait For B4XPage_PermissionResult (Permission As String, Result As Boolean)
|
||||
If Result Then
|
||||
StartService(Tracker)
|
||||
Log("Start Tracker")
|
||||
@@ -565,7 +565,7 @@ End Sub
|
||||
|
||||
Sub copiaDB
|
||||
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
|
||||
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
|
||||
Wait For B4XPage_PermissionResult (Permission As String, Result As Boolean)
|
||||
Dim theDir As String = ""
|
||||
If Result Then
|
||||
Dim theDir As String
|
||||
|
||||
@@ -325,6 +325,10 @@ Private Sub B4XPage_Created (Root1 As B4XView)
|
||||
SV_ENCUESTA.Width = Root.Height
|
||||
p_pregunta1.Height = Root.Height
|
||||
p_pregunta1.Width = Root.Height
|
||||
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_CAMERA)
|
||||
Wait For B4XPage_PermissionResult (Permission As String, resultC As Boolean)
|
||||
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
|
||||
Wait For B4XPage_PermissionResult (Permission As String, resultC As Boolean)
|
||||
End Sub
|
||||
|
||||
'You can see the list of page related events in the B4XPagesManager object. The event name is B4XPage.
|
||||
@@ -332,10 +336,6 @@ End Sub
|
||||
Sub B4XPage_Appear
|
||||
B4XPages.MainPage.tipo_venta = tipo_venta
|
||||
encuentasmapa.Initialize
|
||||
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_CAMERA)
|
||||
Wait For Activity_PermissionResult (Permission As String, resultC As Boolean)
|
||||
Starter.rp.CheckAndRequest(Starter.rp.PERMISSION_WRITE_EXTERNAL_STORAGE)
|
||||
Wait For Activity_PermissionResult (Permission As String, resultC As Boolean)
|
||||
|
||||
LA_GPS.TextColor = Colors.Red
|
||||
LA_GPS.Text = "SIN UBICACION GPS"
|
||||
@@ -364,8 +364,14 @@ Sub B4XPage_Appear
|
||||
l_total.Text = s.GetString("TOTAL_CLIE")
|
||||
total_cliente = s.GetString("TOTAL_CLIE")
|
||||
m_lat = "0"
|
||||
If c.GetString("CAT_CL_LAT") <> "" Then m_lat =c.GetString("CAT_CL_LAT")
|
||||
If m_lat.Length < 5 Then m_lat = "0"
|
||||
If c.GetString("CAT_CL_LAT") <> "" Then
|
||||
Log(1)
|
||||
m_lat = c.GetString("CAT_CL_LAT")
|
||||
End If
|
||||
If m_lat.Length < 5 Then
|
||||
Log(2)
|
||||
m_lat = "0"
|
||||
End If
|
||||
m_lon = "0"
|
||||
If c.GetString("CAT_CL_LONG") <> "" Then m_lon =c.GetString("CAT_CL_LONG")
|
||||
If m_lon.Length < 5 Then m_lon = "0"
|
||||
@@ -443,9 +449,10 @@ Sub B4XPage_Appear
|
||||
Tels.Visible = True
|
||||
gest.Visible = True
|
||||
End If
|
||||
Log("LLAMAMOS TTRACJER")
|
||||
CallSubDelayed(Tracker, "Track")
|
||||
CallSubDelayed(Tracker, "StartFLPSmall")
|
||||
If Tracker.FLP.GetLastKnownLocation.IsInitialized Then 'Si tenemos "UltimaUbicaccionConocida" la usamos.
|
||||
If tracker.FLP.IsInitialized and Tracker.FLP.GetLastKnownLocation.IsInitialized Then 'Si tenemos "UltimaUbicaccionConocida" la usamos.
|
||||
B4XPages.MainPage.lat_gps = Tracker.FLP.GetLastKnownLocation.Latitude
|
||||
B4XPages.MainPage.lon_gps = Tracker.FLP.GetLastKnownLocation.Longitude
|
||||
' Log($"Tenemos UUC: ${Tracker.FLP.GetLastKnownLocation.Latitude},${Tracker.FLP.GetLastKnownLocation.Longitude}"$)
|
||||
@@ -474,16 +481,19 @@ Sub B4XPage_Appear
|
||||
End Sub
|
||||
|
||||
Sub GPS_LocationChanged (Location1 As Location)
|
||||
' LogColor($"Entrando a Cliente.GPS_LocationChanged"$, Colors.red)
|
||||
LogColor($"Entrando a Cliente.GPS_LocationChanged"$, Colors.red)
|
||||
If Tracker.FLP.GetLastKnownLocation.IsInitialized And Tracker.FLP.GetLastKnownLocation.Latitude <> 0 Then
|
||||
B4XPages.MainPage.lat_gps = Tracker.FLP.GetLastKnownLocation.Latitude
|
||||
B4XPages.MainPage.lon_gps = Tracker.FLP.GetLastKnownLocation.Longitude
|
||||
' Log("Coords set to: " & B4XPages.MainPage.lat_gps & " and " & B4XPages.MainPage.lon_gps)
|
||||
End If
|
||||
|
||||
If m_lat.Length < 4 Then
|
||||
m_lat = "0"
|
||||
m_lon = "0"
|
||||
End If
|
||||
Dim l1, l2 As Location
|
||||
l1.Initialize2(B4XPages.MainPage.lat_gps, B4XPages.MainPage.lon_gps)
|
||||
' Log($"Coordenadas de la tienda - lat:${m_lat}, lon:${m_lon}"$)
|
||||
Log($"Coordenadas de la tienda - lat:${m_lat}, lon:${m_lon}"$)
|
||||
l2.Initialize2(m_lat, m_lon)
|
||||
|
||||
BT_QR.Enabled = True
|
||||
|
||||
@@ -122,7 +122,7 @@ Sub MapFragment1_Ready
|
||||
'permisos
|
||||
|
||||
rp.CheckAndRequest(rp.PERMISSION_ACCESS_FINE_LOCATION)
|
||||
Wait For Activity_PermissionResult (Permission As String, Result As Boolean)
|
||||
Wait For B4XPage_PermissionResult (Permission As String, Result As Boolean)
|
||||
gmap.MyLocationEnabled = Result
|
||||
|
||||
Dim JavaMapsObject As JavaObject
|
||||
|
||||
@@ -181,7 +181,7 @@ Version=12.8
|
||||
#Region Project Attributes
|
||||
#ApplicationLabel: Salma Venta
|
||||
#VersionCode: 1
|
||||
#VersionName: 4.08.26
|
||||
#VersionName: 4.12.09
|
||||
'SupportedOrientations possible values: unspecified, landscape or portrait.
|
||||
#SupportedOrientations: portrait
|
||||
#CanInstallToExternalStorage: False
|
||||
|
||||
@@ -58,12 +58,12 @@ ModuleClosedNodes2=4,9
|
||||
ModuleClosedNodes20=39,46
|
||||
ModuleClosedNodes21=
|
||||
ModuleClosedNodes3=
|
||||
ModuleClosedNodes4=1,3,5
|
||||
ModuleClosedNodes4=1
|
||||
ModuleClosedNodes5=
|
||||
ModuleClosedNodes6=
|
||||
ModuleClosedNodes7=
|
||||
ModuleClosedNodes8=
|
||||
ModuleClosedNodes9=
|
||||
NavigationStack=C_Principal,JobDone,1527,6,B4XMainPage,i_engrane_Click,602,0,Starter,Process_Globals,14,0,Main,Process_Globals,21,0,Main,Globals,25,0,C_Principal,b_mapa_Click,1681,0,C_Principal,Class_Globals,223,0,C_Principal,B4XPage_Appear,304,3,C_Principal,connecta_Click,1622,6,B4XMainPage,B4XPage_Appear,243,3
|
||||
NavigationStack=Tracker,CreateLocationRequest,115,0,B4XMainPage,B4XPage_Appear,250,0,B4XMainPage,copiaDB,561,0,MAPA_RUTAS,MapFragment1_Ready,118,0,C_Cliente,GPS_LocationChanged,492,6,C_Cliente,B4XPage_Appear,475,6,Tracker,CreateLocationRequestSmallD,132,0,Main,Activity_PermissionResult,52,0,Main,Globals,23,0,Tracker,flp_LocationChanged,190,0,Starter,ENVIA_ULTIMA_GPS,74,0
|
||||
SelectedBuild=0
|
||||
VisibleModules=19,2,20,12,13,4,21,17
|
||||
VisibleModules=19,2,20,12,13,4,21,1,18
|
||||
|
||||
@@ -78,7 +78,7 @@ Sub Service_Destroy
|
||||
End Sub
|
||||
|
||||
Sub ENVIA_ULTIMA_GPS
|
||||
LogColor("Iniciamos ENVIA_ULTIMA_GPS", Colors.Magenta)
|
||||
LogColor("Salma - Iniciamos ENVIA_ULTIMA_GPS", Colors.Magenta)
|
||||
Dim cmd As DBCommand
|
||||
' cmd.Initialize
|
||||
' cmd.Name = "select_fechat"
|
||||
|
||||
@@ -159,7 +159,7 @@ End Sub
|
||||
|
||||
Sub flp_LocationChanged (Location1 As Location)
|
||||
' ToastMessageShow("Loc changed", False)
|
||||
' Log($"Loc changed:${Location1.Longitude},${Location1.Latitude}"$)
|
||||
' LogColor($"Loc changed:${Location1.Longitude},${Location1.Latitude}"$, Colors.red)
|
||||
B4XPages.MainPage.lat_gps = Location1.Latitude
|
||||
B4XPages.MainPage.lon_gps = Location1.Longitude
|
||||
UUGCoords = Location1
|
||||
@@ -184,7 +184,7 @@ Sub flp_LocationChanged (Location1 As Location)
|
||||
'///////
|
||||
Dim coords As String = Location1.Latitude&","&Location1.Longitude&","&formatoFecha(Location1.Time)
|
||||
' Log("Loc changed : "&Location1.Latitude&","&Location1.Longitude&"|"&B4XPages.MainPage.usuario&"|")
|
||||
Log("Mandamos Ubicacion")
|
||||
' Log("Mandamos Ubicacion")
|
||||
' Log(FirebaseMessaging.locRequest)
|
||||
' Solo mandamos la ubicacion si la precision es menor a XX mts
|
||||
' If Location1.Accuracy < 100 Then
|
||||
@@ -194,8 +194,9 @@ Sub flp_LocationChanged (Location1 As Location)
|
||||
B4XPages.MainPage.cliente.LA_GPS.Text = "CON UBICACION GPS"
|
||||
B4XPages.MainPage.cliente.LA_GPS.TextColor = Colors.blue
|
||||
End If
|
||||
LogColor(Location1.Latitude, Colors.red)
|
||||
' LogColor(Location1.Latitude, Colors.red)
|
||||
CallSub2(Starter, "GPS_LocationChanged", Location1)
|
||||
' CallSub2(B4XPages.MainPage.cliente, "GPS_LocationChanged", Location1)
|
||||
' CallSub2(gestion, "GPS_LocationChanged", Location1)
|
||||
' CallSub2(B4XPages.GetPage("Cliente"), "GPS_LocationChanged", Location1)
|
||||
' CallSub2(nuevocliente, "GPS_LocationChanged", Location1)
|
||||
|
||||
Reference in New Issue
Block a user