









































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
This project consist of multipurpose android file
Typology: Summaries
1 / 81
This page cannot be seen from the preview
Don't miss anything!
On special offer
SUBMITTED BY Farddin GLA UNIVERSITY, MATHURA
I have taken efforts in this project. However, it would not have been possible without the kind support and help of many individuals and organizations. I would like to extend my sincere thanks to all of them. I am highly indebted to Netcamp Solutions Pvt. Ltd. For their guidance and constant supervision as well as for providing necessary information regarding the project and also for their support in completing the project. I would like to express my gratitude toward Mr. Santu Purkait, Director: Netcamp Solutions Pvt. Ltd. For their kind co-operation and encouragement which help me in completion of this project. I would like to express my special gratitude and thanks to organization persons for giving me such attention and time. My thanks and appreciations also go to my colleagues in developing the project and people who have willingly helped me out with their abilities. Name: Farddin College ID: 191500284 College: Gla University , Mathura Date: 30-06- Signature
package com.example.netcampproject; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.text.InputType; import android.view.View; import android.widget.Button; import android.widget.EditText; 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 Login extends AppCompatActivity { FirebaseAuth firebaseAuth; EditText e1,e2; Button b1,b2; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout. activity_login ); getSupportActionBar().hide(); b1=findViewById(R.id. otpbutton ); e1=findViewById(R.id. ologin ); e2=findViewById(R.id. ootp ); e2.setInputType(InputType. TYPE_CLASS_TEXT |InputType. TYPE_TEXT_VARIATION_PASSWORD ); firebaseAuth=FirebaseAuth. getInstance (); b2=findViewById(R.id. twobtn ); b1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String s1=e1.getText().toString(); String s2=e2.getText().toString(); if (s1.isEmpty()) { Toast. makeText (Login.this, "Plz fill all the fields", Toast. LENGTH_SHORT ).show(); return; } else { if (s2.isEmpty()) { Toast. makeText (Login.this, "Plzz fill all the fields", Toast. LENGTH_SHORT ).show(); return; } else { firebaseAuth.signInWithEmailAndPassword(s1, s2).addOnCompleteListener(new OnCompleteListener
} else { Toast. makeText (Login.this, "You are not registered with us", Toast. LENGTH_SHORT ).show(); Intent i = new Intent(Login.this, Registration.class); startActivity(i); finish(); } } }); } } } }); b2.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent i=new Intent(Login.this,Registration.class); startActivity(i); finish(); } }); } }
package com.example.netcampproject; import androidx.annotation.NonNull; import androidx.appcompat.app.AppCompatActivity; import android.content.Intent; import android.os.Bundle; import android.text.InputType; import android.view.View; import android.widget.Button; import android.widget.EditText; 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;
android:layout_alignParentEnd="true" android:layout_alignParentBottom="true" android:layout_centerHorizontal="true" android:orientation="vertical">
package com.example.netcampproject; import androidx.appcompat.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; import android.widget.Toast; import com.google.firebase.database.DatabaseReference; import com.google.firebase.database.FirebaseDatabase; public class real_time_database_login extends AppCompatActivity { EditText e1,e2,e3,e4; Button b1; FirebaseDatabase firebaseDatabase; DatabaseReference databaseReference; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); getSupportActionBar().hide(); setContentView(R.layout. activity_real_time_database_login ); e1=findViewById(R.id. realname2 ); e2=findViewById(R.id. realemail2 ); e3=findViewById(R.id. realpass2 ); e4=findViewById(R.id. realphone2 ); b1=findViewById(R.id. realregis2 ); firebaseDatabase=FirebaseDatabase. getInstance (); b1.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { databaseReference=firebaseDatabase.getReference("user"); String s1=e1.getText().toString(); String s2=e2.getText().toString(); String s3=e3.getText().toString(); String s4=e4.getText().toString(); if(s4.length()!= 10 ){ Toast. makeText (real_time_database_login.this, "Plz enter correct phone number", Toast. LENGTH_SHORT ).show(); } else { user user=new user(s1,s2,s3,s4); databaseReference.child(s2).setValue(user); Toast. makeText (real_time_database_login.this, "data base save", Toast. LENGTH_SHORT ).show(); } } }); } }