I\'m trying to place some code inside AlertDialog.Builder
\'s builder.setPositiveButton
method.
The problem is that I\'m getting the follow
Your issue happen with this line code:
.addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {
Here this
parameter compiler let as .OnClickListener
insted of your activity context.
The solutin is so simple:
.addOnCompleteListener(ActivityName.this, new OnCompleteListener<AuthResult>() {
Insted of this
use ActivityName.this
.
addOnCompleteListener(this, new OnCompleteListener<AuthResult>()
"this" in this line means your DialogInterface.OnClickListener , you should check what kind of params this method needs, if Context, try to change it to this
addOnCompleteListener(YourActivityName.this, new OnCompleteListener<AuthResult>()