Skip to content

Instantly share code, notes, and snippets.

@stupidly-logical
stupidly-logical / Signout.java
Created September 6, 2019 14:43
Safely signing out using FirebaseAuth in Android
//Declaration and defination
private FirebaseAuth firebaseAuth;
FirebaseAuth.AuthStateListener authStateListener = new FirebaseAuth.AuthStateListener() {
@Override
public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
if (firebaseAuth.getCurrentUser() == null){
//Do anything here which needs to be done after signout is complete
signOutComplete();
}
else {
@stupidly-logical
stupidly-logical / app.component.html
Created September 6, 2019 14:38
Service based communication between Child and Parent in Angular
<hello name="{{ name }}"></hello>
<p>
Start editing to see some magic happen :)
</p>
<button
(click)="onAddTimestamp()"
>
Add Timestamp
</button>
<app-child