Hello Sir, how do I integrate a physical phone into this program? I tried adding network configuration xml, I've also turned off my firewalls, connected my phone thru USB and wifi, but still my network/pc cannot be accessed thru physical device. I've changed localhost to my local IP also tried using 10.0.2.2 but still no good. Its working fine on emulator tho.
Hello, sir! I know it is annoying when every time people asking the same questions, but how can I make implementation for case when connection is inenable? For example, when app try to connect to database with not existing server it just loading about 2-5 minutes. I think the decision is timer which invoke function to make window with message and buttons to wait or restart activity🤔
can u please make a tutorial of web application and android application run with same mysql database web application using pdo and android application JAVA like i use the same operations from web application and also do it from android application Not a big tutorial u just make a simple CRUD operations like login registration and logout create read update delete functions but please using volley library
Hi sir, I saw your video, which is the "upload image", and thanks for that sir, because it's a really great help for me as a beginner. I'd like to ask you a question, sir: how difficult is it to combine the selected image in register? because I want the registration form to require the user to select an image, such as a 1-by-1 ID.
It's easy, you can check the upload image video, there we are sending image as string so do that login register part first then do the upload image it's easy.
If after you watch on 1:42:00, and try to login then it cant go to main activity, you must change shared preferenced setting on main activity class ("logged", "false").equals("false") changed to ("logged", "true").equals("false"). it fix my error, because AS recognized that you have still logged out if it first parameter still "false" variabel
You should set the shared preferences when login successful. Then on any other activity check if the shared preference for login is true or not. If it's true that means login successful or you should stop the app and open the login page
@@CodesEasy ah i found the actual error, is on the API, My sql query miss star (*) when select query on logout.php, sure now its fine and work same with in your video, about what i say if changing the false param tu trus param it real work can open the next page, but on the back end i dunno the detail whats going on
The registration part works on me But in the login section, when the submit button is pressed, you only see a progress bar and nothing happens The error message also doesn't appear
check the login part, make sure you have implemented the code properly. If you skip any portion it could cause errors. Also you can download full source code from description.
@@CodesEasy I'm a student, I've checked several times, and I'm sure there's nothing wrong with the login code. php, database, and android studio are all exactly like in the video, and the problem is still the same. sorry if I ask too many questions, I want to download the source code to learn but I don't have a paypal account. thanks
Thank you so much sir for the video It will really help me I I can able to store registration data but when I go to login the error shown in my android studio is this SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length, Sir please help me .
Dear Brother, I follow all your video. there are two problems I faced. 1. email input = I can put anything in input in the registration form. 2. Apikey Clean UP= When I click on the log out button, the apiKey does not blank in database. Can you help me, please?
1. I don't understand, it could be some small issue is XML part. 2. This is some error you have made. You have to check the api part first check if there is any mistake then the java. You can also download the complete source code from description
hello, i'm creating an android app for iot so i have to use mqtt protocol and mysql. for broker i'm using hivemq and i want to create login and registration via this tools. do you have any idea how can i create it?
How to fix this? Once i click the submit button in the registration part, it will show this warning "java.net.SSLHandshakeExpection: java.security.cert.CertPathValidatorExpectation: Trust anchor for certificate path not found.", even though I follow all the steps of the code you provide. It seems that i have a problem in SSL certificate. What should i do?
I Success add the data to the database but my page isnt move to login page after registration, i already make intent, and also theres no toast appear to my screen, how to fix it ?
1. Check if you api url is working 2. I would recommend you to watch the video onces more carefully and check if you have made any errors while doing this. There is an option to download the source code also if you are not able to do it.
No it's used to identifying users after login is successful When making a request to fetch something else like a cart page you need to identify the user, so instead of passing username and password you can pass apikey (in short)
Hi i have one issue. When i try to run the project on my home network ip address i get an error but if I use a different network ip address error does not show. I want to run it on my home network so how do i fix it?
This video has really helped me, thank you. I have one problem, the registration works ok but the login crushed the app when i press login. I have watched this video over and over to see where I have missed it but my code is exactly as yours. The error I am getting is "java.lang.NullPointerException: Attempt to invoke virtual method" and the lines pointed to in logcat are progressBar.setVisibility(View.VISIBLE); textViewError.setVisibility(View.GONE); accountNumber = String.valueOf(textInputEditTextAccountNumber.getText()); pwd = String.valueOf(textInputEditTextPassword.getText());
That means you have missed on findViewById part, check if you have initialised all the objects. You might have missed one. Check it carefully the findViewById part
First of all, my English is not very good, sorry, then in the 59 minutes of the code, I successfully connected to the database and put it into the database. The string returned by PHP is also "success", but I still can't execute it Toast text and Intent to login screen, why?
when i click submit button in registration there is error the error is. no connection could be made because the machine actively refuse it in register.php line 3, database connection failed. but my register.php codes is just like yours
hello how to make it so that when a admin user is logging in they will go admin activity page and regular user log in they will go to regular activity page ?
In login, Api side: return user type instead of success message. Android side: check if response== admin If it's true, Create an intent to open admin activity (create new activity for that.) Then if response== normal_user Open users activity. That's all
Hi, I bought the source code and followed your video, but I have a problem while testing app in 1:11:56 part, I checked the source code and it just says "Registration failed", should I use the same api level that u use on the video? im currently using api 31 and you used api30
Hello, i have an error on submitting empty field in registration, forcing to terminate my app, im new to android, where should i start debugging it? Thanks after debugging my code, i found this line "RequestQueue queue = Volley.newRequestQueue(getApplicationContext());" forcing my app to stop. Could you help me solve this? THANKS!
Check the logcat while running the app, now when you face the issue you will be able to find the error and error line etc. Check the error and try googling it. Or you can send the error message here and we would try to help
Thanks for the info about logcat.. I solved it :> , 1 more question, in this line "Toast.makeText(getApplicationContext(), text:"Registration Successful", Toast.LENGTH_SHORT).show();" i got error on "text" and ".show();" part. Cant resolve symbol "text", and unexpected ";"
Hello sir! I have a problem facing even though I follow your step by step instructions. 1. First, when clicking the submit in register, its succesful to register but did not proceed to the login section, instead it only proceed to the register section with the credentials that I input. 2. Second is when im logging in, the apiKey in the db did not random input but it proceed to the main activity page and it wont get me log out when im pressing the log out button since my apiKey in the database is empty. Thank you in advance sir!
1, you should check the intent you are calling check the class name passed 2, You made made some mistake with the code, check the login part php - to make sure random token is generated.
@@CodesEasy I already change into the $apiKey in the login part php but it won't logout instead when I click the logout button first, the json part says logout successfully but it stays on the the MainActivity and when the second or third time that I click the logout button the json part says Unauthorized access
There might be some errors, have you modified anything - if yes check that - most people remove the encryption of the password - if you did that you also have to change in login code php
Check and find what is the mistake, after downloading have you done the setup properly. Also if you have done any modifications to the code. Check all these any change to the code could cause issues too. I remember you to watch the video tutorial which is really well explained. 👍
If you don't use api, remove the api key option from all the sections. But there won't be any authentication for the api calls after login. Its better to keep it. We also have 2 more video on login and registration in android you can reffer that if you want to. Check our channel.
In php, that means you don't have that value. You have to send a post request with that key name. Check the video again logout part. You will get the mistake. if not join our WhatsApp or discord and post the screenshot of the code there. ❤️
You can, just need to add the libraries in a different way. That's all. There is a new version of this video available in the channel. That uses google volley. Check it
Hello teacher! I have a question. When I log in two devices under the same account and log out of one of them it's working but not on the another device. I get error message of "Unauthorized to access". How can I handle this issue? I want to allow user to log in/out on the various devices without issue.
@@CodesEasy what should I change if I want to include age? like I would not be able to use age= String.valueOf(textInputEditAge.getText()); so how do I insert integer to database?
We don't understand the question properly, We think you want to add those details while creating new account. Just add them to the java, php and the database table. It's explained in the video how to do it.
Feel free to ask all your doubts here
We will respond to all your comments
Hello Sir, how do I integrate a physical phone into this program? I tried adding network configuration xml, I've also turned off my firewalls, connected my phone thru USB and wifi, but still my network/pc cannot be accessed thru physical device. I've changed localhost to my local IP also tried using 10.0.2.2 but still no good. Its working fine on emulator tho.
Hello, sir! I know it is annoying when every time people asking the same questions, but how can I make implementation for case when connection is inenable? For example, when app try to connect to database with not existing server it just loading about 2-5 minutes. I think the decision is timer which invoke function to make window with message and buttons to wait or restart activity🤔
can u please make a tutorial of
web application and android application run with same mysql database
web application using pdo and android application JAVA
like i use the same operations from web application and also do it from android application
Not a big tutorial u just make a simple CRUD operations
like login registration and logout
create read update delete functions
but please using volley library
Best tutorial i have seen so far and implementation ! Kudos
Glad it was helpful!
thank u followed every step and worrks perfectly
Happy the the video helped you
Hi sir, I saw your video, which is the "upload image", and thanks for that sir, because it's a really great help for me as a beginner. I'd like to ask you a question, sir: how difficult is it to combine the selected image in register? because I want the registration form to require the user to select an image, such as a 1-by-1 ID.
It's easy, you can check the upload image video, there we are sending image as string so do that login register part first then do the upload image it's easy.
@@CodesEasy thank you very much sir.
@@CodesEasy do you have content sir like GPS, like for example if you click submit your location will show, if you have sir can I have the link sir?
If after you watch on 1:42:00, and try to login then it cant go to main activity, you must change shared preferenced setting on main activity class ("logged", "false").equals("false") changed to ("logged", "true").equals("false"). it fix my error, because AS recognized that you have still logged out if it first parameter still "false" variabel
You should set the shared preferences when login successful. Then on any other activity check if the shared preference for login is true or not. If it's true that means login successful or you should stop the app and open the login page
@@CodesEasy ah i found the actual error, is on the API, My sql query miss star (*) when select query on logout.php, sure now its fine and work same with in your video, about what i say if changing the false param tu trus param it real work can open the next page, but on the back end i dunno the detail whats going on
thanks a lot for your Code , and really nice support Team ,, really thanks a lot
Glad you like it
Can you please mention versions of all software you are using
Using all the latest versions.
Sir please help me how to product add to cart by user I'd php mysql
The registration part works on me
But in the login section, when the submit button is pressed, you only see a progress bar and nothing happens
The error message also doesn't appear
check the login part, make sure you have implemented the code properly. If you skip any portion it could cause errors. Also you can download full source code from description.
If you need many more help feel free to comment here
@@CodesEasy I'm a student, I've checked several times, and I'm sure there's nothing wrong with the login code. php, database, and android studio are all exactly like in the video, and the problem is still the same.
sorry if I ask too many questions, I want to download the source code to learn but I don't have a paypal account.
thanks
same its happens with me too also can u share any solutions
@@HudaAl
Hey mate, have you fixed this problem?
Thank you so much sir for the video It will really help me I I can able to store registration data but when I go to login the error shown in my android studio is this SPAN_EXCLUSIVE_EXCLUSIVE spans cannot have a zero length, Sir please help me .
Check the response string, check if the api is working properly. Check the login php part
Thank you! You helped me a lot!
Happy that the video helped you
Dear Brother, I follow all your video. there are two problems I faced.
1. email input = I can put anything in input in the registration form.
2. Apikey Clean UP= When I click on the log out button, the apiKey does not blank in database.
Can you help me, please?
1. I don't understand, it could be some small issue is XML part.
2. This is some error you have made. You have to check the api part first check if there is any mistake then the java.
You can also download the complete source code from description
hello, i'm creating an android app for iot so i have to use mqtt protocol and mysql. for broker i'm using hivemq and i want to create login and registration via this tools. do you have any idea how can i create it?
Good morning/afternoon/evening sir, i followed everystep of the vid you made it's wonderful but i'm having this "org.json.JSONException: Value
What if you want to change user data from Activity to Fragment page??
You can access the shared preferences from way where. check the part in the video where accessing and writing into sharedpreferences is shown.
Registration is working fine but on Login screen when i click Login, the app closes i typed the code same like you did.
Check the logcat, you will see the error there. Most probably it is an issue with the object initialisation
Luckily found your video 👌👌👌👌👌👌👌
We are really happy that you liked the video.
Hello Sir, I am just a beginner can I use those code on the latest version of Android we have now?
Sure
How to fix this? Once i click the submit button in the registration part, it will show this warning
"java.net.SSLHandshakeExpection: java.security.cert.CertPathValidatorExpectation: Trust anchor for certificate path not found.",
even though I follow all the steps of the code you provide.
It seems that i have a problem in SSL certificate. What should i do?
That's because you are using http url, I have shown in the video itself how to fix it. You just have to add one line in manifest
@@CodesEasy It fixed, Thank you so much!
I Success add the data to the database but my page isnt move to login page after registration, i already make intent, and also theres no toast appear to my screen, how to fix it ?
1. Check if you api url is working
2. I would recommend you to watch the video onces more carefully and check if you have made any errors while doing this. There is an option to download the source code also if you are not able to do it.
@@CodesEasy the register is successful, now the login is error, when i click the login button, nothing happen
You might have made mistake on the login java part check it.
Thank you sir, everything was successful
error i got is when I click on fetch user button, no data is visible in the application
Please help
There will be error in the fetch user data part most probably in the php part check if you are passing value properly from android also
Good video, the unauthorized access part fails, I changed the apikey as you did in php but it keeps giving me an error
Check the video once more. The api part. If you cant do it download the source code from description and check.
Using fire base or mysql which is better?
It really depends on you and your use case
I think mysql is much better , because you can easily manipulate the data
but this one is local host right then how to do for rrealtime app
@@bonfaceosuka
Sir, make it for housing rental, sir, using PHP and Android Studio version of Kotlin
Sure
when i click the bottom logout, it says "all fields are required ", i uninstall the app but it keeps appearing
You will be missing something. Check if both email and apikey have been password properly with proper values
Hi, can i ask what is the purpose of apiKey? is it really needed to connect to mysql?
No it's used to identifying users after login is successful
When making a request to fetch something else like a cart page you need to identify the user, so instead of passing username and password you can pass apikey (in short)
Hi i have one issue. When i try to run the project on my home network ip address i get an error but if I use a different network ip address error does not show. I want to run it on my home network so how do i fix it?
Check if the ip address is changing. You can also use ngrock to create a link for your api.
This video has really helped me, thank you. I have one problem, the registration works ok but the login crushed the app when i press login. I have watched this video over and over to see where I have missed it but my code is exactly as yours. The error I am getting is "java.lang.NullPointerException: Attempt to invoke virtual method" and the lines pointed to in logcat are
progressBar.setVisibility(View.VISIBLE);
textViewError.setVisibility(View.GONE);
accountNumber = String.valueOf(textInputEditTextAccountNumber.getText());
pwd = String.valueOf(textInputEditTextPassword.getText());
That means you have missed on findViewById part, check if you have initialised all the objects. You might have missed one. Check it carefully the findViewById part
First of all, my English is not very good, sorry, then in the 59 minutes of the code, I successfully connected to the database and put it into the database. The string returned by PHP is also "success", but I still can't execute it Toast text and Intent to login screen, why?
Make sure the success message is using small case in php and java side. It's case sensitive
@@CodesEasy I'm pretty sure I used upper case, The return value is also uppercase
inside on response use Log.e("data", response); Log the response and then check whats the response string
when i click submit button in registration there is error the error is. no connection could be made because the machine actively refuse it in register.php line 3, database connection failed. but my register.php codes is just like yours
Your php file has an error, most probably with database credentials
@@CodesEasy when i clicked the submit button the error and the toast is not showing, even though the URL and codes ung provided is correct
Hi sir. During the login test I am receiving an error:
Java.lang.RuntimeException: org.json.JSONException: Value
i found an error on my login.php thx
Invalid json format
hello how to make it so that when a admin user is logging in they will go admin activity page and regular user log in they will go to regular activity page ?
In login,
Api side: return user type instead of success message.
Android side: check if response== admin
If it's true, Create an intent to open admin activity (create new activity for that.)
Then if response== normal_user
Open users activity.
That's all
@Codes Easy oh thank you
Thank you and i want to know is this work with volley?
Yes it uses google volley
Hi, I bought the source code and followed your video, but I have a problem while testing app in 1:11:56 part, I checked the source code and it just says "Registration failed", should I use the same api level that u use on the video? im currently using api 31 and you used api30
If it's showing registration failed that the error with php api part. Check it if you made some small mistakes
I've solved the problem by temporary removing "apiKey" due to it cannot be null, after dropping that in phpmyadmin the app started to save users
Can we use common database instead of local db , so that all user use same DB
We are using MySQL database not a local android device specific one.
Can you use Wamp for this implementation also ??
Yes
Hello, i have an error on submitting empty field in registration, forcing to terminate my app, im new to android, where should i start debugging it? Thanks
after debugging my code, i found this line "RequestQueue queue = Volley.newRequestQueue(getApplicationContext());" forcing my app to stop. Could you help me solve this? THANKS!
Check the logcat while running the app, now when you face the issue you will be able to find the error and error line etc. Check the error and try googling it. Or you can send the error message here and we would try to help
Thanks for the info about logcat.. I solved it :> , 1 more question, in this line "Toast.makeText(getApplicationContext(), text:"Registration Successful", Toast.LENGTH_SHORT).show();" i got error on "text" and ".show();" part. Cant resolve symbol "text", and unexpected ";"
Check the syntax, go to the part in video so that you can check the syntax.
I solved it :> thanks, now im stucked on progressbar, it didnt stopped, i think i need to rewatch the video again
If you need more help just ask. We are always here ❤
Hello sir! I have a problem facing even though I follow your step by step instructions.
1. First, when clicking the submit in register, its succesful to register but did not proceed to the login section, instead it only proceed to the register section with the credentials that I input.
2. Second is when im logging in, the apiKey in the db did not random input but it proceed to the main activity page and it wont get me log out when im pressing the log out button since my apiKey in the database is empty.
Thank you in advance sir!
1, you should check the intent you are calling check the class name passed
2, You made made some mistake with the code, check the login part php - to make sure random token is generated.
@@CodesEasy I already change into the $apiKey in the login part php but it won't logout instead when I click the logout button first, the json part says logout successfully but it stays on the the MainActivity and when the second or third time that I click the logout button the json part says Unauthorized access
My registration is ok i can register but when i log in, it only show the progressbar and nothing happens
There might be some errors, have you modified anything - if yes check that - most people remove the encryption of the password - if you did that you also have to change in login code php
have you solved the problem? i am also having the same problem as yours.
TextView RregisterNow catnot call activity Registration class, ...what's the metter ser
What are you trying to do. You have made mistake check the video once more and correct it. You can also download the source code from description
@@CodesEasy it was corect mr, iam follow step one by one. But can't run smoothly...
Registration page is demanding api key if i don't enter any dummy api key it show error registration failed
Remove the key from the SQL and also from the php code.
When i am done with the app and lets say making it an apk will tge login still work even if im connected to a different network
You just have to upload the php files and data base to a real server
I bought your code but it doesn't login, it doesn't work
Check and find what is the mistake, after downloading have you done the setup properly. Also if you have done any modifications to the code. Check all these any change to the code could cause issues too.
I remember you to watch the video tutorial which is really well explained. 👍
How If i don't use api key field??
If you don't use api, remove the api key option from all the sections.
But there won't be any authentication for the api calls after login. Its better to keep it.
We also have 2 more video on login and registration in android you can reffer that if you want to. Check our channel.
Guys anyone can help me to connect my android studio to mysql data base please
It's explained in this video.
How to get data where id username?
Watch the video, part where we are fetching the profile details of the user.
if i do the php in visual studio code is this working?
I want to write the php code directly on the server. I don't want to write in android project. So will the PHP codes work?
PHP runs on the server only.
How to fix undefined array key on logout button ?
In php, that means you don't have that value. You have to send a post request with that key name. Check the video again logout part. You will get the mistake. if not join our WhatsApp or discord and post the screenshot of the code there. ❤️
@@CodesEasy yea i found the problem, i write ur database name not mine hahaha, thanks dude
Happy that you where able to figure out the error 🙂
@@CodesEasy can you make "fetch user profile data ?" like username, email, address, phone. i like how u explain all of this
This video has that. We are showing all those as a json string. You just have to use that and show it in some view. Use textview etc
Best 👍
Happy that you liked it
in database my userinput name are all zero 0
Check the data type in the table
@@CodesEasy now all fields are required when I logout huhuhu
how can i connect my db from 000webhost?
Yes
is it still usable in android koala version?
You can, just need to add the libraries in a different way. That's all.
There is a new version of this video available in the channel. That uses google volley. Check it
@@CodesEasy i cant find it
Current video you are waiting is also using volley. There is not change needed. What exactly is the issue you are facing?
@@CodesEasy sry my bad im using kotlin, in video you give code for groove dependencies
Hello teacher! I have a question. When I log in two devices under the same account and log out of one of them it's working but not on the another device. I get error message of "Unauthorized to access". How can I handle this issue? I want to allow user to log in/out on the various devices without issue.
if you want to allow multiple devices to access the same account, you have to create a new table to keep track on each login sessions
Hello, does it mean each time user log into another device, new apiKey(with user id) is added to the new table?
You did know api where you got dada
It's shown in the video.
wait, is this android studio? why i can't seem to create php file in it
For php i am using an ide named PHPStorm. You can also use vs code or any other (not android studio)
@@CodesEasy what should I change if I want to include age? like I would not be able to use
age= String.valueOf(textInputEditAge.getText());
so how do I insert integer to database?
Add extra column in the datable update the SQL query and php file then update the java part also.
Why in my app have a Trojan virus 🤧
Do not install any apk from websites you dont know. Be safe browsing
@@CodesEasy i get the Trojan from my android studio app ,how to fix that ?:"
Have you downloaded anything suspicious. If yes remove those and just do a scan also.
incomplete
You need help to complete the app. Are you facing any errors? Feel free to ask, we are happy to help
Toal is one bank account one number add files catmr name details.
Name
Emli
Id
Ai
Api
Ri
Account location open files
We don't understand the question properly,
We think you want to add those details while creating new account. Just add them to the java, php and the database table. It's explained in the video how to do it.
ᑭᖇOᗰOᔕᗰ 😩
Are you facing any issues, feel free to ask