FOROS PROFESIONALES
WINDEV
,
WEBDEV
y
WINDEV Mobile
Inicio
|
Mensajes recientes
|
Conéctese...
|
Desconectar
|
Español
Inicio
→
WINDEV Mobile 2024
→
GPS PROBLEM ON BACKGROUND
GPS PROBLEM ON BACKGROUND
Iniciado por PILAR, 14,abr. 2021 10:53 - 2 respuestas
Conéctese…
PILAR
#1
Publicado el 14,abril 2021 - 10:53
First of all sorry for my english.
I am working in an app that need to give the GPS of the user, even when the app is in background or close.
I have been trying several options but none of them are working.
The procedure is a call to the webservice, in which the info has to be passed a database and that it is updated, as I comment in quite simple, I have put in this procedure that the authomatic procedure is periodic execution when app is in background, and the procedure is as follows:
PROCEDURE posicionbackground()
dtData is DateTime
MyPosition is a geoPosition
MyPosition = GPSGetPosition()
IF gpsDisabled = True THEN
gsReport = "GPS Disabled"
dtData = SysDateTime()
ELSE IF gpsOffService = True THEN
gsReport = "GPS off service"
dtData = SysDateTime()
ELSE IF gpsUnavailable = True THEN
gsReport = "GPS Unavailable"
dtData = SysDateTime()
ELSE
gsReport = ""
dtData = ""
END
gsLatitude = MyPosition..Latitude
gsLongitude = MyPosition..Longitude
JSONResultado is JSON
vResultado is Variant
vPosicion is Variant
h est un httpRequête
h..Méthode = httpPost
h..URL = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
h..ContentType = "application/json"
h..Entête["Authorization"] = "xxxxxxxxxxxxxxxxxxxxxxxxxx"
vPosicion.Empleado = gsIdCodiEmpleatLogged
vPosicion.Dispositivo = SysIdentifier()
vPosicion.Latitud = gsLatitude
vPosicion.Longitud = gsLongitude
vPosicion.Data = SysDateTime()
vPosicion.error = gsReport
vPosicion.DataError = dtData
h..Contenu = VariantVersJSON(vPosicion)
r est un restRéponse = RESTEnvoie(h)
JSONResultado = r..Contenu
vResultado = JSONToVariant(JSONResultado)
As I comment it is quite simple, I understand that I do not have to call the procedure anywhere else, because the call is supposed to be made automatically, I do not know if someone can give me a hand.
Thank you in advance.
Informar
0
0
Ben
#2
Miembro registrado
10 mensajes
Popularité : +1 (1 vote)
Publicado el 19,mayo 2021 - 21:33
https://developer.android.com/about/versions/10/privacy/changes
Informar
0
0
PILAR
#3
Publicado el 03,junio 2021 - 18:06
thank you very much.
Informar
0
0
→ Volver a WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versiones precedentes)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Búsqueda Tipo
Sólo temas
Todos los mensajes
Periodo Buscar
Cualquier fecha
Última hora
Última 24 horas
Última semana
Último mes
Último año
Cancelar
Vista previa del mensaje
Añadiendo una imagen
Importar una imagen desde una URL
Enviar una imagen desde un archivo de su disco
Arrastrar un archivo o click en "Examinar..."
o
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto