I have created Fragment and when click a button get popup like dialog alter view. in that view include google sign in button. when i connect to the firebase and continue the implementation after the startActivityForResult i need to override onActivityResult method. but popup corresponded class extend another Dialog class and can not override onActivityResult method. when going to override it shows method does not override method from its superclass error. how to solve this. and how to implement my firebase login.
thank you. here is my code
public class DialogGoogle extends Dialog { private Activity activity; @BindView(R.id.btn_google) LinearLayout btnGoogle; private GoogleSignInClient mGoogleSignInClient; private FirebaseAuth mAuth; private int RC_SIGN_IN = 1; public DialogGoogle(Activity a, boolean isTab, int width, int height) { super(a, R.style.DialogTheme); this.activity = a; this.isTab = isTab; this.windowWidth = width; this.windowHeight = height;} in onCreate method
// Initialize Firebase Auth mAuth = FirebaseAuth.getInstance(); // Configure Google Sign In GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN) .requestIdToken(this.activity.getString(R.string.default_web_client_id)) .requestEmail() .build(); mGoogleSignInClient = GoogleSignIn.getClient(this.activity,gso); After i created some method
public void signInGoogle() {Intent signInIntent = mGoogleSignInClient.getSignInIntent(); startActivityForResult(signInIntent, RC_SIGN_IN);} in after startActivityForResult() I need to get result and i used onActivityResult() but i cannot override method in that DialogGoogle class. i run usually signInGoogle() method in button click
AppCompatActivity. In that case, it becomes an activity.