Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/amangrobo/Notifications
Browse files Browse the repository at this point in the history
 into development
  • Loading branch information
amangrobo committed Aug 1, 2019
2 parents 573bce0 + cb5d25f commit 22fc79c
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ public void onResult(CredentialRequestResult credentialRequestResult) {
} catch (IntentSender.SendIntentException e) {
e.printStackTrace();
}
Toast.makeText( LoginActivity.this, "No credentials", Toast.LENGTH_SHORT ).show();
}
}
} );
Expand Down Expand Up @@ -154,9 +153,28 @@ private void setBaseFragment(Bundle savedInstanceState) {
public void onLoginSelected(final String email, final String password) {

this.email = email;
Credential credential = new Credential.Builder( email )
.setPassword( password ) // Important: only store passwords in this field.
// Android autofill uses this value to complete
// sign-in forms, so repurposing this field will
// likely cause errors.
.build();
save( credential );

new CountDownTimer( 3000, 1000 ) {
@Override
public void onTick(long millisUntilFinished) {

login( email, password );
}

@Override
public void onFinish() {


login( email, password );
mCredentialClient.disconnect();
}
}.start();


}
Expand Down Expand Up @@ -337,24 +355,7 @@ public void onResponse(Call<Person> call, Response<Person> response) {
if (person != null) {
Log.e( "response", person.getUser().getEmail() );
parseData( person );
new CountDownTimer( 2000, 1000 ) {
@Override
public void onTick(long millisUntilFinished) {

}

@Override
public void onFinish() {

Credential credential = new Credential.Builder( email )
.setPassword( password ) // Important: only store passwords in this field.
// Android autofill uses this value to complete
// sign-in forms, so repurposing this field will
// likely cause errors.
.build();
save( credential );
}
}.start();
} else
Toast.makeText( LoginActivity.this, "Verification failed", Toast.LENGTH_SHORT ).show();

Expand Down Expand Up @@ -389,6 +390,7 @@ public void onResponse(Call<Person> call, Response<Person> response) {
Toast.makeText( LoginActivity.this, "Signup failed, error " + response.code(), Toast.LENGTH_SHORT ).show();
Log.e( "bad request", response.toString() );
}
progressDialog.dismiss();
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_login.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/logo"
android:src="@drawable/iitp" />
android:src="@drawable/profile_photo" />

</com.google.android.material.card.MaterialCardView>

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/fragment_sign_up.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
android:layout_height="match_parent"
android:contentDescription="@string/logo"
android:scaleType="centerCrop"
android:src="@drawable/iitp" />
android:src="@drawable/profile_photo" />

</androidx.cardview.widget.CardView>

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<string name="qr_code_folder_name">QR</string>
<string name="logo">Logo</string>
<string name="welcome">Welcome</string>
<string name="password">Password</string>
<string name="password">Create Password</string>
<string name="login">Login</string>
<string name="webmail_username">Webmail username</string>

Expand Down

0 comments on commit 22fc79c

Please sign in to comment.