Android Question Login Validation against PHP remote call problem

Nick McCulloch

Member
Licensed User
I have a test project (see attached) that asks for user name and password in the main Activity when the "Login" button is pressed. It does an HTTP GET to send the request and get a "Result " back. Is the Result is "True" then login was good so then display the next Activity Screen (eventsList). BUT, the program flow is as the attached flow screenshot. I dont know why it goes back to the Main Activity. What am I doing wrong?
Also attached is the simple project.

help !! :)
 

Attachments

Mashiane

Expert
Licensed User
I'm confused about line 85, is that supposed to be the Result of the Resumable Sub?

If so, then don't declare Result on Process_Globals. Check this video out, https://www.b4x.com/etp.html?vimeography_gallery=1&vimeography_video=255570732

Your best bet will be, https://www.b4x.com/android/forum/threads/b4x-okhttputils2-with-wait-for.79345/#content

And whilst my example here, https://www.b4x.com/android/forum/threads/mysql-data-to-webview-using-php.104274/ is not using waitfor, perhaps it might help to understand the sequencing of events of the app. Ta!
 
Last edited:

Nick McCulloch

Member
Licensed User
I'm confused about line 85, is that supposed to be the Result of the Resumable Sub?

If so, then don't declare Result on Process_Globals. Check this video out, https://www.b4x.com/etp.html?vimeography_gallery=1&vimeography_video=255570732

Your best bet will be, https://www.b4x.com/android/forum/threads/b4x-okhttputils2-with-wait-for.79345/#content
"Result" is a string returned from the http response. I may have declared it in the wrong place , but, I dont think it should matter much to be honest.
I moved it to "Globals" and it made no difference.
 
Top