Skip to content
Snippets Groups Projects
Commit e163432b authored by sreeram-0xb5e's avatar sreeram-0xb5e
Browse files

Merge branch 'master' of /home/sreeram_0xb5e/AndroidStudioProjects/TaskBoxx with conflicts.

parent 284e2ffa
No related branches found
No related tags found
No related merge requests found
......@@ -28,4 +28,7 @@ dependencies {
compile 'com.android.support:design:25.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.google.firebase:firebase-auth:10.2.0'
}
apply plugin: 'com.google.gms.google-services'
\ No newline at end of file
{
"project_info": {
"project_number": "629462529132",
"firebase_url": "https://browsy-bc721.firebaseio.com",
"project_id": "browsy-bc721",
"storage_bucket": "browsy-bc721.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:629462529132:android:50e3b5ef2ef861e3",
"android_client_info": {
"package_name": "com.example.taskboxx"
}
},
"oauth_client": [
{
"client_id": "629462529132-b6vra23omvdfhos88osa7bvv0p1g8lrv.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyBsz9xV3HCn9UXJ6TOP2mlRNeTGVSDw9gE"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}
}
],
"configuration_version": "1"
}
\ No newline at end of file
......@@ -12,8 +12,7 @@
android:name=".Dashboard"
android:label="DashBoard"
android:theme="@style/AppTheme.NoActionBar" />
<activity android:name=".LoginActivity"
android:theme="@style/AppTheme.NoActionBar">
<activity android:name=".LoginActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
......
package com.example.taskboxx;
import android.app.ProgressDialog;
import android.content.Intent;
import android.graphics.Paint;
import android.support.annotation.NonNull;
import android.support.design.widget.TabLayout;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.support.v7.widget.Toolbar;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ProgressBar;
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 SignUpActivity extends AppCompatActivity {
private Button signup_button;
private EditText name;
private EditText username;
private EditText emailid;
private EditText pwd;
private EditText confirm_pwd;
private ProgressDialog pd;
public FirebaseAuth firebaseAuth;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_sign_up);
firebaseAuth = FirebaseAuth.getInstance();
signup_button = (Button) findViewById(R.id.SignUp);
name = (EditText) findViewById(R.id.input_Name_SignUp);
username = (EditText) findViewById(R.id.input_Username_SignUp);
emailid = (EditText) findViewById(R.id.input_email_SignUp);
pwd =(EditText) findViewById(R.id.input_NewPass_SignUp);
confirm_pwd = (EditText) findViewById(R.id.input_RePass_SignUp);
pd = new ProgressDialog(this);
}
public void SignUp(View view){
Toast.makeText(this, "Registered!", Toast.LENGTH_SHORT).show();
Toast.makeText(this, "Please Log In to Proceed", Toast.LENGTH_SHORT).show();
Intent loginintent = new Intent(this,LoginActivity.class);
startActivity(loginintent);
String u_name = name.getText().toString();
String u_username = username.getText().toString();
String u_email = emailid.getText().toString();
String u_pwd = pwd.getText().toString();
String u_c_pwd = confirm_pwd.getText().toString();
if (TextUtils.isEmpty(u_name) || TextUtils.isEmpty(u_username) || TextUtils.isEmpty(u_email) ||TextUtils.isEmpty(u_pwd) ||TextUtils.isEmpty(u_c_pwd) )
{
Toast.makeText(this,"Please Enter All the fields to proceed!",Toast.LENGTH_SHORT).show();
return;
}
if (u_pwd.equals(u_c_pwd) )
{
pd.setMessage("Browsy is Registering User!");
pd.show();
firebaseAuth.createUserWithEmailAndPassword(u_email,u_pwd)
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if(task.isSuccessful())
{
pd.hide();
Toast.makeText(SignUpActivity.this,"Registered Successfully!",Toast.LENGTH_SHORT).show();
}
else
{
pd.hide();
Toast.makeText(SignUpActivity.this,"Failed to register!",Toast.LENGTH_SHORT).show();
}
}
});
}
else
{
Toast.makeText(this,"The Entered Password doesn't Match!",Toast.LENGTH_SHORT).show();
return;
}
//Toast.makeText(this, "Registered!", Toast.LENGTH_SHORT).show();
}
}
......@@ -129,6 +129,10 @@
android:background="#EEEEEE"
android:onClick="SignUp"
android:text="Sign Up" />
</LinearLayout>
</RelativeLayout>
</ScrollView>
......@@ -6,6 +6,7 @@ buildscript {
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.google.gms:google-services:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment