Hi All hope someone can help. I have used the GmailContacts example as a base the modifiy the link loaction and scope to address Google Latitude. It works well Oauth good and the resopnse is as documented by google and I get my last location back. simple!!! However I should be able to return the responce data/format to update my location. however i get
{"error":{"errors":[{"domain":"global","reason":"parseError","message":"This API does not support parsing form-encoded input."}],"code":400,"message":"This API does not support parsing form-encoded input."}}
Here's the hacked code.
"m" contains the data from the first request and is "global scope".
Changed the Job done sub
Can anyone help
Jason
{"error":{"errors":[{"domain":"global","reason":"parseError","message":"This API does not support parsing form-encoded input."}],"code":400,"message":"This API does not support parsing form-encoded input."}}
Here's the hacked code.
"m" contains the data from the first request and is "global scope".
Changed the Job done sub
B4X:
If HttpUtils.IsSuccess(url) Then
Dim Parser As JSONParser
Parser.Initialize(HttpUtils.GetString(url))
Dim m , n As Map
m = Parser.NextObject
The fist time a call the Lattitude I don't past any data this populates "m" it also sets "FirstTimeComplete" from then on I'm passing the data back....
Sub RequestContactsList
ProgressDialogShow("Sending contacts list request...")
Dim strTemp , tempst As String
If FirstTimeComplete Then
Dim JSONGenerator As JSONGenerator
JSONGenerator.Initialize(m)
strTemp = JSONGenerator.ToPrettyString(2)
HttpUtils.PostString("ContactList", LocationLink & "?access_token=" & AccessToken, strTemp)
Else
HttpUtils.Download("ContactList", LocationLink & "?access_token=" & AccessToken)
FirstTimeComplete = True
End If
End Sub
Jason
Last edited by a moderator: