Android Question Does Gps coordinates(lat and lng) take time to load on the screen?

fricentric

Member
Licensed User
Longtime User
Q1. Does the gps coordinates(lat and lng) take time to load the screen? 15 mins after running the project i get the gps coordinates. y so?
Q2. if i implement the api call inside the gps project that has to send the current gps coordinates(lat and lng) to the server, i get an error. The error snapshot is attached. The longitude is not displayed on the screen leaving behind the json response which is in the snapshot.
 

Attachments

  • Screenshot_2017-01-05-12-06-34.png
    Screenshot_2017-01-05-12-06-34.png
    62.7 KB · Views: 208

fricentric

Member
Licensed User
Longtime User
The code goes here:
Public Sub LocationChanged(Location1 As Location)
lat= Location1.Latitude
lng= Location1.Longitude
lb1.Text=lat
lb1.Text=lng
Dim job1 As HttpJob
job1.Initialize("Job1", Me)
job1.Download("http://abc.com/abc?latitude=lat&longitude=lng&distance=5") //api call to the server
End Sub

Sub JobDone (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Job1"
'print the result to the logs
Log(Job.GetString)
End Select
Else
Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub
Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
End Sub


after executing this i get an error which i attached previously.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
Upvote 0
Top