The app and code in the video are tested and perfectly working. However, I have seen that some of you are facing difficulties and getting some errors, so here is a beginners guide to debugging: 1) Error: Null object reference Solution: This always means you have given the wrong XML ID, just correct it 2) Error: User Credentials not sent to Firebase Solution: Check if you have added all dependencies else do the following: In Android Studio, go to Tools > Firebase. Click on it. A new tab will open. Click on Authentication > More Info > Email and Password Authentication Link. Another tab will open. Check if the first step shows connected to the database. If not, just click on it and you should be asked for Firebase credentials and on entering that, you will get connected :) 3) Error: App is crashing Solution: Check your logcat section present at the bottom of Android Studio, it will tell you where you have made the error or what caused the error. Just go to that line then and debug. 4) Error: App crashing in emulator: This happens because your emulator doesn't have the latest google play store services. Either update play store or just run it on normal phone Also, some things to note: 1) Every new user must have unique email ID 2) The password length must be more than 8 characters long 3) Internet must be ON Hope this helped everyone :)
Proffesor can u help me please with this error Caused by: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.demo.easylearn/LoginActivity.demo.myapp.SecondActivity}; have you declared this activity in your AndroidManifest.xml?
@valmirlimani23144 жыл бұрын
Activity main : if (user != null) { finish(); startActivity(new Intent(MainActivity.this, SecondActivity.class)); } Android Manifest :
@dibyajyotimishra78714 жыл бұрын
sir how to create a dashboard specific to an user?
@MohammedAli-mc1dm3 жыл бұрын
@@valmirlimani2314 It seems you did not create the second activity page or you have named it incorrectly. You may want to watch part 1 and 2 again. That is what i did.
@faladimabaso65844 жыл бұрын
The best tutorial in the world. WOW amazing teacher. keep up the good work. Best Presentation and Explanation why certain things are being done. First time I have been able to connect to Firebase successfully and validating.Please do not be discouraged, continue the good work...
@kufomatembo87915 жыл бұрын
Professor DK, you are the truly more than a professor, your explantion and approach are very ideal and always helping me. Keep it up...
@MrBooman19845 жыл бұрын
You are doing very well. Please keep it up.
@utkdreaming5 жыл бұрын
Your series is the most detailed and explanatory, you also helped remove errors thanks a lot.
@Thisirishlife6 жыл бұрын
Thanks so much! You really helped connect the dots for me on this topic! You are really good at explaining concepts compared to most videos I've seen.
@benwiddop71286 жыл бұрын
Professor DK you saved my coursework :D
@GBeRecordings7 жыл бұрын
Very Helpful, please upload part 4 as soon as possible.
@ProfessorDK7 жыл бұрын
Will do. Thanks :)
@TECHPLUGTamil4 жыл бұрын
Simply WoW 😲😲
@namehf5 жыл бұрын
Hey there! Nice tutorial, I'm really thankful to people like you who take the time to make them. I do have a question though, if you wanted to use the database from a website instead of Firebase, how would you do it?
@namehf5 жыл бұрын
Edit : the database in question uses mySQL and phpMyAdmin if that helps ^^'
@ProfessorDK5 жыл бұрын
Android has MySQL libraries you can use to connect to your db.
@izor22106 жыл бұрын
dude, i need help. how about if i want to create where user 1 can log in to activity 1, and user 2 can log in to activity 2, because my app need an admin to see all of the data from the user.(it's quiz application, and the admin can make question freely, and the another user must answer and get score from it, then all of the result can be see by admin)
@SKREFI6 жыл бұрын
Sup mate, maybe it is a little to late, but what if you make the app do something else if email == "your@email" && password == "yourpassword". Like, go into an other activity hidden from the real app where you can add questions :) Hope it helps, even tho in 9 months I am sure you found a way and I would like to know how you did it, maybe there is a better idea then mine :) Thank you.
@romnicknitro40866 жыл бұрын
thanks for the tutorial.. it helps me a lot on my project,, its easier to use firebase as database than the sqlite.. creating a table in SQL is a hell lot of coding,,hehe
@pratikprajapati86206 жыл бұрын
Best explanation sir
@techwithjovi84996 жыл бұрын
sir when i launch my app it goes straight to second activity without passing by login activity or registration activity, but if i remove this code if (user !=null){ finish(); startActivity(new Intent(MainActivity.this,HomeActivity.class)); } it works but not login in pls help
@rwill.73136 жыл бұрын
I missed it, because it is very short, but at 14:30, there is a note that says to "Go to Settings > Apps / App Info > (LoginDemoApp) > Clear All Data (for the app)" BEFORE you open the app. That will take you to the login page instead of the SecondActivity. Also, note that you have to login with your EMAIL ADDRESS instead of your NAME. I still have a problem if I do not sign in correctly. The app will stop working. But this may be a start, and perhaps it will be corrected in future videos.
@feeqqaa6 жыл бұрын
Not sure if you still need the another alternative solution beside what Ricardo has provided but you can just change the user != null to user == null and the app will bring you to the login/registration activity page first. user != null means it is to check whether the user has logged in on their first time, and if they are logged in (AND IF YOU DON'T HAVE A LOGOUT FUNCTION) then this mean whenever you run your app it'll always bring you to the second activity and not the login/registration activity. However, user == null means it will always check first and "pretend" always that it is the user's first time using the app. Hope you understand my explanation though!
@whacker43216 жыл бұрын
Amazing content !!! You are helping me so much !!! I am learning so much more !!! Thank you !!
@YashwantKharsan6 жыл бұрын
i want to get "already registered" message. when user try to register the account again which is already created.
@siddhantamohapatra13757 жыл бұрын
This is really helpful ..thank you for sharing this wonderful thing..I'm a newbie in Android development , I'm making a food ordering app, used sign up and sign in as per your video..Can you help me making it in future videos..it will be really helpful for me as well as people like me who wants to make an app
@ProfessorDK7 жыл бұрын
+siddhanta mohapatra Yes, other videos will be uploaded in a week :)
@siddhantamohapatra13757 жыл бұрын
Thank u so much@Professor DK
@HimanshuSingh-rp1ui5 жыл бұрын
My if statement is not working in registeractivity what should i do
@arpitkumar25436 жыл бұрын
Thanks sir you are doing a good job ..... and yes i will subscribe this channel . Sir, i need to clear data each time i start the app are we going to solve this problem in this series ??
@ProfessorDK6 жыл бұрын
This is only until the app completes. Once the series is completed, you no longer have to clear the data. Don't worry :)
@feeqqaa6 жыл бұрын
Your tutorials have been great so far! Thank you so much for all the hardwork! Things have been going fine EXCEPT for the part where my app will crash/force close if I don't put in any credentials. logcat state, "2018-10-18 11:15:27.070 3070-8735/com.google.android.googlequicksearchbox:search W/VelvetNetworkClient: Cannot connect to server without account" and run tab state, "java.lang.IllegalArgumentException: Given String is empty or null" I did googled for the argument exception error though and most StackOverflow replies said it has something got to do with the blank current_key on the json file and I should input a random key. However, when I checked the json file, my current_key is stated and it's not blank. So I have no idea where else the fault lies on? Do you know how I can fix this? Please do guide me. Thanks everyone~
@ProfessorDK6 жыл бұрын
This issue gets resolved in the later part of the series. Don't worry :)
@feeqqaa6 жыл бұрын
Noted with many thanks, Sir!! :)
@thirunayandinesh86466 жыл бұрын
Hi sir, your videos are really explanative and easy to understand. Can you make a video on how to add events for android calendar view? please reply
@bwinabarbie2765 жыл бұрын
Sir the code which u have published the same i have given but there is a problem that my app crashes when i debug it with the code what can i do sir can u help me?
@DiscoverLivelife7 жыл бұрын
Hi Dheeraj, i was looking for this type of step by step videos.. I saw few other channels videos but i m not happy with that videos every time something they have missed where i could not understand. But here in this videos all are clear and step by step with every variable and string what does.. Please make video how to register with mobile number with validation.. Because as we are moving to advance.. Every one want quick action.. So better to be validatr through mobile number...i m waiting for the same on next video... Thanks.. :) Also if you could provide code link in each video it will be better learn with the same..
@ProfessorDK7 жыл бұрын
Thank you for the wonderful comment and honest feedback. Appreciate it. I'll surely do a video on mobile phone authentication soon. Code link has been added in the description of the video :)
@DiscoverLivelife7 жыл бұрын
Professor DK I sent email to u on ur email id yesterday regarding one of error i saw the difference between u and my work is ur working on Android studio 2.3 and i m working on 3.0.1 may be that the reason it got crashed on my system as there error on root level gradle file.... Where we set the compiler... If u could make the videos on latest version 3.0.1.. It will better for us to rectify us..
@ProfessorDK7 жыл бұрын
Check out my video: kzbin.info/www/bejne/lZqyg4d8fql0d5o in this video I upgrade to the latest version and also solve doubts regarding differences between the versions, do check it out :)
@sumas5626 жыл бұрын
Sir u can also explain, how we can Implement multiple users login
@Programming1774 жыл бұрын
do u know?
@rajkamal2423 жыл бұрын
After doing what u have say'n .My app has got empty login page .Means literally there is nothing in my login page{blank).
@bollymixraja8897 жыл бұрын
amazing tutorial. please upload the next videos too. Please also guide how to include logout facility in second activity
@ProfessorDK7 жыл бұрын
Yes I will be covering that in the next video. Will be out soon, thank you! :)
@MohammedAli-mc1dm3 жыл бұрын
Thank you so much!!! Great! Great! Great! I have learned a lot from your videos! One thing from this part, after completing this part, the app launches the second_activity page first by default. It was launching the activity_main in your part1 and 2 videos. Not sure what I did wrong. I have spent a lot of time trying to research this mistake. Checked the Manifest. XML and all look normal there. Any help would be grateful!
@MohammedAli-mc1dm3 жыл бұрын
NVM i fixed it. Sorry i didn't see your message at the end. I uninstalled and reinstalled the app on the phone app and it launched the main activity ::
@engr.anowarulislam54795 жыл бұрын
How to validate the input fields?
@chakhna7 жыл бұрын
Sir what happened when i am login and i press back button.its exit or go back to previous activity.
@indrajajogi16016 жыл бұрын
Hello sir. Plzz suggest how to make Admin login along with User login plzzz. Sir in same video
@alaabidalhussain27105 жыл бұрын
Yes very important aspect to be covered.
@ritikakalla325 жыл бұрын
Very nice Explaination Sir. My Login page is not appearing when I run the app it directly open SecondActivity , why is it so??
@bradleyj46355 жыл бұрын
Ritika Kalla same problem for me
@klkdz4 жыл бұрын
@@bradleyj4635 ME TOOO. did you solve the problem already?
@Abhishekyadav-mo6py4 жыл бұрын
on running the app it is opening the second activity windwo
@candidconnections57626 жыл бұрын
When i am trying to run the app its not running .Just opens and then closes with a message 'app has stopped working' In android studio it shows no error on building.But a dialogue box appeared once saying all packages can't be downloaded.
@ChInzZenFloW3102k7 жыл бұрын
I like it, please more videos ❤️
@waelaldroubi63137 жыл бұрын
Dear Professor DK, the application is working but when I press on create new user the application crashes and ask me to restart the application, what to do please? thank you
Due to if(user! =null) condition from registrationActivity it is directly going to secondActivity, Can you help me
@ProfessorDK6 жыл бұрын
Go over to settings and clear data of the app
@anuraggupta56656 жыл бұрын
Sir I'm facing problem while registering. Actually when i goto registration activity and input data, after clicking register button registration gets successful but then automatically instead of going to Mainactivity it directly moves to second activity. I've checked and matched my codes with urs many times but couldn't figured the mistake. Please help me. So I can move to next part of tutorial.
@harshithchoudhary58055 жыл бұрын
Dude i am facing the same problem, did you find any solution?
@dennismaina16576 жыл бұрын
Hi, I created my app succesfulyy. Unfortunately. When a user registers. it automaticaly logs the in. I need them to be logged in only when they log in
@bradleyj46355 жыл бұрын
How to validate if the input fields are empty then set error message ?
@rupertacuesta5 жыл бұрын
Bradley J that should be a simple statement such as using an if statement. For instance, something like if(name.equals(“ “)) { Toast.makeText(“please fill this field); }
@bloodhero59586 жыл бұрын
When I click LOGIN button without inputting email and password app is crashing
@ProfessorDK6 жыл бұрын
Check if you assigned the right XML ID to the login button :)
@fingerstylesahil76786 жыл бұрын
I am facing the same error, even the XML ID added to the Button is correct. Please help
@damilolaawoma40874 жыл бұрын
Yes please, am also getting a crash when I input on the username or password
@tantelyariellelauraratsito36474 жыл бұрын
hello! it was really helpful but It only works if I register a new user but if I log with pre-registered user,the login failed why?
@auoo10004 жыл бұрын
Sir, as I run the app, I am straightaway sent to second activity, what could be the problem? I can't find any misplaced intent
@stymdxt4 жыл бұрын
Did you figured out how to solve this?
@brindhar50214 жыл бұрын
For me also 😔
@auoo10004 жыл бұрын
@@stymdxt yes i found a way but forgot what i did to correct it now😂
@stymdxt4 жыл бұрын
@@auoo1000 thnx..i too figured it out and now don't have any idea how i fixed it..can understand
@pradipsalgude33316 жыл бұрын
sir after registration username and password is not accepted login failed all code is right
@indrajajogi16016 жыл бұрын
I am to getting Same Error
@ArunKumar-pq6yj6 жыл бұрын
Pls help
@niranjanadevisekar35056 жыл бұрын
Use email id for username instead of user name
@ArunKumar-pq6yj6 жыл бұрын
@@niranjanadevisekar3505 thnx
@kateshirazi56425 жыл бұрын
@@ArunKumar-pq6yj I am still getting this issue. did it get fixed for you
@chaitrashetty67815 жыл бұрын
My app crashes if i dont enter the email and password and directly click the login button. How should i display an error message when the details are not entered and stop the app from crashing?
@kashishgautam52245 жыл бұрын
there is an error showing "Cant build to local 8604 for debugger" and many more no. like this ??? what to do ???
@Programming1774 жыл бұрын
sir how to add this code to fire store
@mansivijay40446 жыл бұрын
Sir, in my device it is saying that registration is successful but there is no update observed in firebase. What could be the possible reasons?
@ProfessorDK6 жыл бұрын
Check if you are connected to firebase under tools > firebase > authentication.
@bharathcool43877 жыл бұрын
Sir, can u also explain how to implement resetting the password?
@ProfessorDK7 жыл бұрын
+bharath cool Sure buddy :)
@jayedm33426 жыл бұрын
very nice
@kiarashukla45466 жыл бұрын
progessDialog is deprecated and is not working , alternative is progessbar but I don't know how to use that. Need Help
@ProfessorDK6 жыл бұрын
Okay will make a video to cover that :)
@ashbalbinaqeel35396 жыл бұрын
you are great sir :)
@sadisusalisu2166 жыл бұрын
Wow very wonderful videos Professor, but please i have SPLASH ACTIVITY. But whenever the splash activity finish it directly go to the main page not login activity. help me on that please.
@ProfessorDK6 жыл бұрын
Firstly go to app info, removed all cache data and try again. If it is still going to main page, it means your intent in splash activity is wrong. Either of these.
@sadisusalisu2166 жыл бұрын
Thank you very much Professor dk, I tried to do that but whenever I navigate to the Apps settings the settings is stopping ( crashing.
@sadisusalisu2166 жыл бұрын
wow Thank you very much professor, it works perfectly, I delete it and debug it again.
@archy-x6 жыл бұрын
How can you make a log out button in the second activity?
@ProfessorDK6 жыл бұрын
Just add the button in the second activity layout and then add the logout functionally code like I have done in that
@rwill.73136 жыл бұрын
Yes... I missed it, because it is very short, but at 14:30, there is a note that says to "Go to Settings > Apps / App Info > (LoginDemoApp) > Clear All Data (for the app)" BEFORE you open the app. That will take you to the login page instead of the SecondActivity. Also, note that you have to login with your EMAIL ADDRESS instead of your NAME. I still have a problem if I do not sign in correctly. The app will stop working. But this may be a start, and perhaps it will be corrected in future videos.
@Toha_H6 жыл бұрын
Firstly, I thank you for such a detailed video, I learned a lot of useful information. But I encountered the following problem (already this question was asked): after the start activity, a transition to the last created activity takes place. The Intent is written correctly, on the form of authorization. I cleared the cache, but this only helps before the application closes the first time, after all it repeats again. I apologize for my English, I use an interpreter.
@ProfessorDK6 жыл бұрын
Use finish() to destroy any activity you don't want to return to.
@yashsonavane80966 жыл бұрын
Hello sir, I have created the entire app accordingly but when i run it, directly the second activity is displayed. What shall I do now ?
@ProfessorDK6 жыл бұрын
Go over to settings, app info and then delete any existing data. Then run the app again :)
@rwill.73136 жыл бұрын
Yes... I missed it, because it is very short, but at 14:30, there is a note that says to "Go to Settings > Apps / App Info > (LoginDemoApp) > Clear All Data (for the app)" BEFORE you open the app. That will take you to the login page instead of the SecondActivity. Also, note that you have to login with your EMAIL ADDRESS instead of your NAME. I still have a problem if I do not sign in correctly. The app will stop working. But this may be a start, and perhaps it will be corrected in future videos.
@rupertacuesta5 жыл бұрын
So i run the app and the login page isnt appearing straight away, its the second activity that pops up...?
@srikanthvaddeboina81444 жыл бұрын
Hi I am facing the same problem..did you found the way to rectify it??
@rupertacuesta4 жыл бұрын
Srikanth Vaddeboina its been a whole year since I’ve done this😅 don’t quote me on it but maybe mess around with which one to set visible, can’t remember much from that far back.
@srikanthvaddeboina81444 жыл бұрын
@@rupertacuesta oh ok 😅 Thanks
@vivins32155 жыл бұрын
After login from firebase I want to pass that username to a dashboard
@AK1_37 жыл бұрын
sir when will you do video on refer and earn program
@ProfessorDK7 жыл бұрын
Right now timetable app series and login app series are going on. It will take some time. Thank you for your patience :)
@imanuellagurue38026 жыл бұрын
why this code if(emailflag){ finish(); startActivity(new Intent(MainActivity.this, BlankFragmen.class)); not support FragmentClass??
@ProfessorDK6 жыл бұрын
It does
@pratikjawa66656 жыл бұрын
SIr when i login still it takes me to the register page whereas it should sign me into second activity. What can be the problem?
@ProfessorDK6 жыл бұрын
Check your intent. Maybe you have given the wrong destination class
@pratikjawa66656 жыл бұрын
Professor DK got it silly mistake😂😂
@mansivijay40446 жыл бұрын
Due to if(user! =null) condition from registrationActivity it is directly going to secondActivity, so I had to remove it and it finally worked. Can you explain me the reason?
@ProfessorDK6 жыл бұрын
It is used to save the user from logging in again. So until the user logs out, the user is not equal to null and you can direct the user to home page of app saving one the effort after they have logged in once.
@gabzmann72706 жыл бұрын
Hi, whenever i try to login it crashes. It crashes when i leave in the "if(user != null)" condition. When I leave out that condition it works, but doesn't load the SecondActivity page. Any ideas?
@ProfessorDK6 жыл бұрын
There is some problem in your SecondActivity.java. that's why it isn't loading. Check for the logcat error :)
@gabzmann72706 жыл бұрын
Hey it doesn't crash now, but I've done exactly what you did, but any time i login, it fails. Would you have any ideas why?
@rwill.73136 жыл бұрын
+Gabzmann: I don't know if this will help, but I realized that I have to use my email and password (not my name and password) to login. And the password has to be at least 8 digits and a mixture of letters and numbers, I think. And the user needs to already be in the "users" screen in Firebase. In other words, you need to have successfully signed up.
@70shehan5 жыл бұрын
i got this kind of errot message while running the app.. how can i resolve it sir ""F:\MC project\StudentInfomationSystem\app\src\main\java\com\example\studentinfomationsystem\screentwo.java: uses or overrides a deprecated API. Recompile with -Xlint:deprecation for details.""
@chakhna6 жыл бұрын
Sir i implement progressdialogue in register activity after that i create new registration.it go to secount activity without going main activity.
@chakhna6 жыл бұрын
Helpme sir
@manishugru55936 жыл бұрын
I too have same problem..help me sirrrr
@ProfessorDK6 жыл бұрын
Check what u have given inside the Intent. Maybe you have given the destination as secondActivity :)
@chakhna6 жыл бұрын
Professor DK no sir given main activity.
@ProfessorDK6 жыл бұрын
Oh okay yeah. I checked. I will be explaining and correcting the error in my new video releasing today :)
@Bizniiz5 жыл бұрын
everything works fine. but why i get logged in automatically after i register an account?
@gnaneshgn83415 жыл бұрын
ProgressDialog is not displaying an message....please help..!!
@MohamedAhmed-lr5xs5 жыл бұрын
tell me what u typed as a code for the ProgressDialog
@saiteja3316 жыл бұрын
Without data if I click login button it's closing app and showing app stopped
@ProfessorDK6 жыл бұрын
There can be two reasons for this: 1) You must have assigned the wrong XML ID to the variable in Java 2) You haven't added the function to check if the data inside the edit text is empty or not
@prabinkarki44366 жыл бұрын
Very nice video I have learnt many things from this video thank you so much But in my login form password field is not accepting alphabet only number it is accepting why sir???
@damilolaawoma40874 жыл бұрын
Sir please the app crashes when I login with only username or password. Except if I put both details it works perfectly well
@prakashwaddar52935 жыл бұрын
Sir i need registration code.
@MustafaKamal-iz8vs7 жыл бұрын
Thank you waiting for next video and recommended that make a video on text recognition library to recognition digits its request Thank you..🙂
@ProfessorDK7 жыл бұрын
Okay definitely. Will cover it in the next video! :)
@samisyed8996 жыл бұрын
How can we make it work using any username and password instead of email
@ProfessorDK6 жыл бұрын
storing email and password or login through phone are the only methods of secured authentication which are present in any technology. You could do login with username but the app won't be secure and can't be trusted :)
@nithinpinapaka7 жыл бұрын
Sir how to get logout after signing in
@ujjalkumarray94275 жыл бұрын
thank you so much sir.
@razellaliaps80817 жыл бұрын
please upload part 4 :)
@chewemvula13866 жыл бұрын
hi Professor these is a very helpful videos thanks so much.....i am having difficulties in "signing up" i keep getting this message "unfortunately app has stopped working" how do i go about this??
@ProfessorDK6 жыл бұрын
+Chewe Mvula Could you post the message seen in your logcat when it crashes. It will help me debug better :)
@chewemvula13866 жыл бұрын
02-07 08:53:14.062: E/Surface(1639): getSlotFromBufferLocked: unknown buffer: 0xaa392ce0 is this what you are looking for??or can i send you a screen shot of my logcat
@ProfessorDK6 жыл бұрын
+Chewe Mvula Not this. Send the entire thing to my mail dheerajkamath22@gmail.com
@jkuhede5 жыл бұрын
Thanq Ji !
@patelvaibhavee17666 жыл бұрын
Registration fail a rha hai . please help me
@tubagusputra57886 жыл бұрын
I got some error code when installing the APK. the code says "Error:(47, 30) error: cannot find symbol class progressDialog" What should I do, Prof?
@ProfessorDK6 жыл бұрын
Its ProgressDialog with capital P
@kinleypenjor33104 жыл бұрын
@@ProfessorDK Sir my whole code here for registration. I user is not getting inserted in firebase. can you help me pls. package com.example.testlogin; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.content.SharedPreferences; import android.net.Credentials; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.TextView; import android.widget.Toast; import com.google.android.gms.tasks.OnCompleteListener; import com.google.android.gms.tasks.Task; import com.google.firebase.auth.AuthResult; import com.google.firebase.auth.FirebaseAuth; public class RegistrationActivity extends AppCompatActivity { private EditText eRegName; private EditText eRegEmail; private EditText eRegPassword; private Button eRegister; private TextView userLogin; private FirebaseAuth firebaseAuth; ; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_registration); setupUIViews(); firebaseAuth = FirebaseAuth.getInstance(); eRegister.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if(validate()){ //register to the database; String user_Email = eRegEmail.getText().toString().trim(); String user_Password = eRegPassword.getText().toString().trim(); firebaseAuth.createUserWithEmailAndPassword(user_Email,user_Password).addOnCompleteListener(new OnCompleteListener() { @Override public void onComplete(@NonNull Task task) { if (task.isSuccessful()){ Toast.makeText(RegistrationActivity.this, "Registration Successful",Toast.LENGTH_SHORT).show(); startActivity(new Intent(RegistrationActivity.this, MainActivity.class)); } else { Toast.makeText(RegistrationActivity.this, "Registration failed",Toast.LENGTH_SHORT).show(); } } }); } } }); userLogin.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { startActivity(new Intent(RegistrationActivity.this, MainActivity.class)); } }); } private void setupUIViews() { eRegName = findViewById(R.id.etregname); eRegEmail=(EditText) findViewById(R.id.etemail); eRegPassword = (EditText) findViewById(R.id.etregisterpassword); eRegister = (Button) findViewById(R.id.btnregisterpass); userLogin = (TextView) findViewById(R.id.tvalreadyregister); } private Boolean validate() { Boolean result = false; String name = eRegName.getText().toString(); String email = eRegEmail.getText().toString(); String password = eRegPassword.getText().toString(); if (name.isEmpty() || password.isEmpty() || email.isEmpty()) { Toast.makeText(this, "Field is empty", Toast.LENGTH_SHORT).show(); } else { return true; } return result; } }
@mikimartinez79046 жыл бұрын
Sir where is the app info and how to delete the data?
@ProfessorDK6 жыл бұрын
Settings > Installed Apps > LoginDemo > App info. Delete all data
@mr.akshitagarwal71234 жыл бұрын
Sir. I Liked Your Videos very much and they helped to learn app development.. But In this example I did same as you said in the video but when I am running the code.... my apps starts with directly with the SecondActivity but if I comment the following code: FirebaseUser user = firebaseAuth.getCurrentUser(); if(user!=null) { finish(); startActivity(new Intent(MainActivity.this,SecondActivity.class)); } My app does not allow to go to second activity even with correct username and password... PLEASE HELP SIR..
@DanielShuster966 жыл бұрын
Hello tnx for the vid!! but i got a problem, even if the login failed it automatically redirect me to the seconed page, pls help?!!
@DanielShuster966 жыл бұрын
I did it without the countdown!! if it metters..
@DanielShuster966 жыл бұрын
Same thing if i register sucssefuly
@stymdxt4 жыл бұрын
Did you figured out how to solve this
@nooruddinshaikh1246 жыл бұрын
There is no error in my coding but when i am running the app it get crash and showing this error Like Fatal Exception Main and java.lang.runtime exception : unable to start the process and some more error similar to this is showing......Sir Please Help me Out
@ProfessorDK6 жыл бұрын
Could you post your logcat error?
@nooruddinshaikh1246 жыл бұрын
E/AndroidRuntime: FATAL EXCEPTION: main Process: shareindia.nooruddin.shareindia, PID: 7992 java.lang.RuntimeException: Unable to start activity ComponentInfo{shareindia.nooruddin.shareindia/shareindia.nooruddin.shareindia.LoginPage}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setOnClickListener(android.view.View$OnClickListener)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2791) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1574) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:203) at android.app.ActivityThread.main(ActivityThread.java:6364) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1076) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:937) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.setOnClickListener(android.view.View$OnClickListener)' on a null object reference at shareindia.nooruddin.shareindia.LoginPage.onCreate(LoginPage.java:46) at android.app.Activity.performCreate(Activity.java:6691) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1124) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2744) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856) at android.app.ActivityThread.-wrap12(ActivityThread.java) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1574) at android.os.Handler.dispatchMessage(Handler.java:110) at android.os.Looper.loop(Looper.java:203) at android.app.ActivityThread.main(ActivityThread.java:6364) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1076) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:937) I/Process: Sending signal. PID: 7992 SIG: 9 Application terminated.
@ProfessorDK6 жыл бұрын
In your loginpage.java file, line number 46, i think the Button you have defined has the wrong XML id. Check the part where you did the findViewByID for the button :)
@nooruddinshaikh1246 жыл бұрын
Professor DK i have not declare the line 46 object as button but i have declare it has textview for if the user is not registered by clicking on that text view page shall goto registration activity
@komalkasyap71046 жыл бұрын
Sir , everytime I logged into app I got login failed. please help me
@ProfessorDK6 жыл бұрын
Make sure you register with a new email id each time. Else just delete all users from Firebase website and then create new user to login.
@SouvikVersatile5 жыл бұрын
I am also facing the same issue.
@pranayasharma8196 жыл бұрын
Thank you sir!!
@cheonsagel95445 жыл бұрын
May I have your permission to copy this application?
@swastikijari11596 жыл бұрын
Inactivity, disconnecting from the service ,i am getting this error plz help me
@ProfessorDK6 жыл бұрын
Are you running it on the emulator?
@jan-lucag34907 жыл бұрын
Hey, Great Tutorial! Unfortunately I have an issue with the login. Every time i try to login with some login data from the database it says "Login failed". I have everything exactly like you but i left out the five attemps. What should I do now? Can someone help me?
@ProfessorDK7 жыл бұрын
+Jan-Luca Ganz Have you enabled SignIn method on the website? Check if the internet connection is working, also check if you have added all the dependencies :)
@Staliscyrils6 жыл бұрын
Hi Professor DK, Thanks for the tutorial. I also enabled the sign in method on the website, but can not sign in to the app after logging out
@kateshirazi56425 жыл бұрын
@@Staliscyrils I am having the same issue. were you able to fix it?
@HimanshuSingh-rp1ui5 жыл бұрын
It's always showing registeration failed
@konstantinosnikoloutsos34026 жыл бұрын
I believe firebase has created firebase UI for us so that we dont have to create xml layouts.
@bhavanaanumanchipalli31817 жыл бұрын
hii sir ....thanks for your video's...these helped me a lot ...but I got a problem that ...in the case of giving login credentials wrong ones ,it should show the login failed message and no of attempts remaining but the app is going to be stoped in this case .In case of correct login credentials ,it's perfect. Can u please help me with this???
@ProfessorDK7 жыл бұрын
+Bhavana Anumanchipalli Could you post the error message seen in your logcat when the app crashes?
@bhavanaanumanchipalli31817 жыл бұрын
Professor DK ...there is no error in the logcat sir .... "unfortunately,the app(name of the app) is stopped" is the message that is shown when I enter the wrong credentials into the login form.
@ProfessorDK7 жыл бұрын
+Bhavana Anumanchipalli Check if you have defined the Textview which is used to display the number of attempts remaining
@bhavanaanumanchipalli31817 жыл бұрын
Professor DK ...yeah ,I have done it
@ProfessorDK7 жыл бұрын
+Bhavana Anumanchipalli I have added the code links in the description. Compare your code with that.
@arjunwalia7376 жыл бұрын
Hi sir this was a very helpful video...but whenever i am trying to login after signup, it says login failed and the counter decreases...please help me.!
@ProfessorDK6 жыл бұрын
Use username.equals("admin") instead of username == admin. Do the same for password. It will work :)
@arjunwalia7376 жыл бұрын
Professor DK sir, this was when we gave the string earlier when there was no use of fire base (this issue was solved) but now after using firebase the login is not possible, i mean it shows login failed
@arjunwalia7376 жыл бұрын
Professor DK please sir help me...im making a project for major, and i am short on time
@arjunwalia7376 жыл бұрын
Professor DK sir can u please help.. I'm in a middle of something here.
@amankamboj8906 жыл бұрын
Hello Arjun, How you resolved your error? I am also facing the same issue....
@len51207 жыл бұрын
Sir, please give tutorial on logout after this login otherwise whenever I launch the app, it directly goes to the secondactivity. please help sir
@ProfessorDK7 жыл бұрын
You can go to settings > app info and delete all data. Then you can restart the app to get the first activity! :)
@manishugru55936 жыл бұрын
where is app info?
@manishugru55936 жыл бұрын
please help me....i too have the same problem
@manansoni8156 жыл бұрын
this is temp solution. when i register with new email it directs to SecondActivity i dont know how because i set intent to reg.this to mainactivity.class
@krupalpatel53996 жыл бұрын
Sir !! Nice Video , But I have one Error When i register User First time registe Sucessfully... But After First time it always show "Registration Fail!!!". plz fix
@ProfessorDK6 жыл бұрын
You can only create a user once. You cannot create another user with the same email. It must be unique :)
@jdcoding10126 жыл бұрын
Thank you
@kailashsharanbaral36457 жыл бұрын
sir could u please upload the source code??
@ProfessorDK7 жыл бұрын
No problem. It has been posted in the description of the video! :)
@patelvaibhavee17666 жыл бұрын
Loginn is fail . App is stopped. And second activity is not opened.
@christopherhartanto6916 жыл бұрын
Must be Email instead username(without @gmail.com and so on)