viewmodel-firebase-sample
viewmodel-firebase-sample copied to clipboard
Integrate Firestore
https://firebase.google.com/docs/firestore/quickstart?hl=es-419
Hey Gonzalo I was able to integrate Firestore and Ill be happy to collaborate, just create a new project. Thanks and best regards
Hey John! Happy to hear that! Are there any ways to integrate Firestore to the current project as "another repository"? If not, we can create a new project without problem. I didn't have much time to review Firestore and how to use that, but I assume this should be very similar to Firebase. If that is the case, I think we can create a new branch to include that.
Regards, Gonzalo.
This is how i do it for the sign in and signup auth
` public class BaseAuthOnCompleteListener implements OnCompleteListener<AuthResult> {
private FireAuthCallback fireAuthCallback;
public BaseAuthOnCompleteListener(FireAuthCallback fireAuthCallback) {
this.fireAuthCallback = fireAuthCallback;
}
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if(task.isSuccessful()){
fireAuthCallback.onSuccess(task);
}else if(!task.isSuccessful())
try{
throw task.getException();
}catch (FirebaseAuthWeakPasswordException weakPassword){
fireAuthCallback.onError(weakPassword);
}catch (FirebaseAuthInvalidCredentialsException malformedEmail){
fireAuthCallback.onError(malformedEmail);
}catch (FirebaseAuthUserCollisionException existEmail){
fireAuthCallback.onError(existEmail);
}catch (FirebaseAuthException authException){
fireAuthCallback.onError(authException);
} catch (Exception e){
fireAuthCallback.onError(e);
}
}
}`
Sorry, for the late response. That looks very good! I assume you fought with that and now have some stable version. If you want, you can implement a simple login screen with that logic and submit them to a new branch. When you have that, I can review it and merge if everything looks good.
Hi guys! Finally do you have a stable repository with this commented stuff? Thanks and good work with the viewmodel!!
@gonzalonm Sorry for late reply I been so busy ok I will.
@billyjoker Yes I have a stable version firestore and firebase using @gonzalonm model. I will create a repo just wait for a couple of days.
That sounds great! Please, create a new branch from master a push a pull request. I will review it asap!!