GRUPOS DE DISCUSSÃO PROFISSIONAL
WINDEV
,
WEBDEV
e
WINDEV Mobile
Inicio
|
Mensagens recentes
|
Conecte-se...
|
Disconnect
|
Português
Inicio
→
WINDEV Mobile 2024
→
GPS PROBLEM ON BACKGROUND
GPS PROBLEM ON BACKGROUND
Iniciado por PILAR, abr., 14 2021 10:53 AM - 2 respostas
Conecte-se…
PILAR
#1
Publicado em abril, 14 2021 - 10:53 AM
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.
Denunciar
0
0
Ben
#2
Membro registado
10 mensagems
Popularité : +1 (1 vote)
Publicado em maio, 19 2021 - 9:33 PM
https://developer.android.com/about/versions/10/privacy/changes
Denunciar
0
0
PILAR
#3
Publicado em junho, 03 2021 - 6:06 PM
thank you very much.
Denunciar
0
0
→ Voltar para WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (versões anteriores)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Tipo de Pesquisa
Apenas tópicos
Todas as mensagens
Período de pesquisa
Qualquer momento
Última hora
Últimas 24 horas
Semana passada
Mês passado
Ano passado
Cancelar
Pré-visualização da sua mensagem
Adicionar imagem
Importar uma imagem de uma URL
Enviar uma imagem a partir do seu disco
Deixe um ficheiro ou clique em "Procurar ..."
ou
Cancelar
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Texto