FORUMS PROFESSIONNELS
WINDEV
,
WEBDEV
et
WINDEV Mobile
Accueil
|
Messages récents
|
Connexion
|
Déconnexion
|
Français
Accueil
→
WINDEV Mobile 2024
→
GPS PROBLEM ON BACKGROUND
GPS PROBLEM ON BACKGROUND
Débuté par PILAR, 14 avr. 2021 10:53 - 2 réponses
Connectez-vous…
PILAR
#1
Posté le 14 avril 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.
Signaler
0
0
Ben
#2
Membre enregistré
10 messages
Popularité : +1 (1 vote)
Posté le 19 mai 2021 - 21:33
https://developer.android.com/about/versions/10/privacy/changes
Signaler
0
0
PILAR
#3
Posté le 03 juin 2021 - 18:06
thank you very much.
Signaler
0
0
→ Revenir à WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (précédentes versions)
Français
English
Español
Portuguesa
Fermer cette fenêtre
Type de recherche
Uniquement les sujets
Tous les messages
Période de recherche
Date indifférente
Moins d'une heure
Moins de 24 heures
Moins d'une semaine
Moins d'un mois
Moins d'un an
Annuler
Aperçu de votre message
Ajouter une image
Importer une image depuis une URL
Envoyer une image depuis un fichier de votre disque
Déposez ici un fichier ou cliquez sur "Parcourir..."
ou
Annuler
0%
WLangage
SQL
XML, HTML
JAVA, Javascript
Texte