I am using this small piece of code to access Googles translation engine:
B4X:
job.Initialize("", Me)
poststr = GOOGLE_LNG & procs.SRCLANG & "&tl=" & procs.DSTLANG & "&dt=t&q=" & spoken
job.PostString(poststr, "")
job.GetRequest.SetHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.3; rv:36.0) Gecko/20100101 Firefox/36.0")
Wait For (job) JobDone(j As HttpJob)
If j.Success Then
'translation successful
trans = job.GetString
'get translation out of JSON formatted string
trans = procs.ParseJson(trans)
End If
This code works pretty fine for me but from time to time this code stops working. In the debug window I can see that Google starts blocking my IP address telling me that " systems have detected unusual traffic from your computer network". I know that polling to fast results in blocking by Google. So, I have included a timer (20 sec) to my code to avoid fast polling. Nevertheless, after days and sometimes after hours Goggle is blocking me again. Is there any way how I can refuse this behaviour by code or configuration. After resetting my router everything works fine again.
It appears your app is using a google translation service that is meant for occasional "human" user requests, and not requests from automated systems (your app).
I think there is no programmatically way to bypass this issue. Unfortunately! Learning vocabulary requires permanently access to Google (may be 10 – 20 times per minute). If IP has been blocked, I restart my router and everything is fine again. But this is – of course – not a problem solver when sitting in a restaurant or café.