This week's book giveaway is in the NodeJS forum. We're giving away four copies of Serverless Applications with Node.js and have Slobodan Stojanovic & Aleksandar Simovic on-line! See this thread for details.
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.
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?
posted 2 months ago
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.
posted 2 months ago
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.
Note to self: don't get into a fist fight with a cactus. Command this tiny ad to do it:
global solutions you can do at home or in your backyard