This week's book giveaway is in the XML and Related Technologies forum.
We're giving away four copies of Java XML & JSON and have Jeff Friesen on-line!
See this thread for details.
Win a copy of Java XML & JSON this week in the XML and Related Technologies forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Devaka Cooray
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Java Log In and move to new page  RSS feed

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Brief Background into what I'm doing.
I'm making an Android App on Android Studio, which connects to a SQL database (through a php file. I'm using WAMP server). I simply want the app to have a log in page and allow the user to log in if their details are in the table in the database and then go to a new page.

Would anyone have any simple way of doing this?

Thanks in advance

 
Saloon Keeper
Posts: 5219
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What part are you wondering about specifically? Creating the activity with the login page? Connecting to the DB over the net? Checking the results and starting a new activity or layout? Something else?
 
Harry Burke
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Tim Moores wrote:What part are you wondering about specifically? Creating the activity with the login page? Connecting to the DB over the net? Checking the results and starting a new activity or layout? Something else?



Sorry should have said this.

The system begins on MainActivity.java, and then is sent to BackgroundWorker.java. In BackgroundWorker.java, I have the connection to the database all set up and the user is able to Log In on the app.

However I'm having an issue when I'm trying to get the information that the user has successfully / not successfully logging in back to the MainActivity.java so that then I can call a new page.

Thanks
 
Tim Moores
Saloon Keeper
Posts: 5219
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is BackgroundWorker an Activity? if so, start it with startActivityForResult, and have your activity implement onActivityResult to receive any results back from it (via setResult).

If BackgroundWorker is an AsyncTask (which would be more suitable for a background job than an Activity) you would use its onProgressUpdate method to transfer results back to the starting Activity.
 
Get out of my mind! Look! A tiny ad!
Programmatically Create PDF Using Free Spire.PDF with Java
https://coderanch.com/wiki/703735/Programmatically-Create-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!