I have finally got my device accessing the web but it is not doing what I am expecting. The following is a very basic test program to log into gmail just put your username and password in the relevant text boxes and press GO. It should either log in successfully and show the new gmail logged in screen in the webview or else the 'have you entered the correct username/password' screen, but in just shows the first screen before you login.
What am I doing wrong? (before I have no hair left)
Thanks
Edward
B4X:
Sub Process_Globals
Dim postData As String
Dim PostUrl As String
End Sub
Sub Globals
Dim GoBtn As Button
Dim s As String
Dim WebView1 As WebView
Dim PasswordTxt As EditText
Dim UserNameTxt As EditText
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("layout1")
End Sub
Sub GoBtn_Click
postdate = "ltmpl=default<mplcache=2&pstMsg=1&dnConn=https%3A%2F%2Faccounts.youtube.com&continue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3F&service=mail&rm=false&dsh=5677402227554726706<mpl=default<mpl=default&scc=1&timeStmp=&secTok=&GALX=JwTvGlScxBM&Email=" & UserNameTxt.Text & "&Passwd=" & PasswordTxt.Text & "&rmShown=1&signIn=Sign+in&asts="
PostUrl = "https://www.google.com/accounts/ServiceLoginAuth"
HttpUtils.CallbackActivity = "Main"
HttpUtils.CallbackJobDoneSub = "JobDone"
HttpUtils.CallbackUrlDoneSub = "UrlDone"
Msgbox("Sending URL","")
HttpUtils.PostString ("Job1",PostUrl,postData)
End Sub
Sub UrlDone(Url As String)
Log(Url & " done")
End Sub
Sub JobDone (Job As String)
Msgbox("Getting return","")
If HttpUtils.IsSuccess(postUrl) Then
s = HttpUtils.GetString (postUrl)
WebView1.LoadHtml(s)
End If
End Sub
What am I doing wrong? (before I have no hair left)
Thanks
Edward