My Application ID is 07FF99FE-D1D0-9F1F-FF54-77706B254700
So I’m having an issue with registering user to the table. I keep getting the message ‘Provided email has wrong format’ and I’m using the standard format john@gmail.com. Does anybody know why I keep getting this message?
Code Below:
public class Register extends AppCompatActivity {
private View mProgressView;
private View mLoginFormView;
private TextView tvLoad;
EditText etName, etMail, etPassword, etReEnter;
Button btnRegister;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_register);
mLoginFormView = findViewById(R.id.login_form);
mProgressView = findViewById(R.id.login_progress);
tvLoad = findViewById(R.id.tvLoad);
etName = findViewById(R.id.etName);
etMail = findViewById(R.id.etMail);
etPassword = findViewById(R.id.etPassword);
etReEnter = findViewById(R.id.etReEnter);
btnRegister = findViewById(R.id.btnRegister);
btnRegister.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(etName.getText().toString().isEmpty()||etMail.getText().toString().isEmpty()||etPassword.getText().toString().isEmpty()||etReEnter.getText().toString().isEmpty()){
Toast.makeText(Register.this, "Please enter all details", Toast.LENGTH_SHORT).show();
}
else{
if(etPassword.getText().toString().trim().equals(etReEnter.getText().toString().trim())){
String name = etName.getText().toString().trim();
String email = etName.getText().toString().trim();
String password = etPassword.getText().toString().trim();
BackendlessUser user = new BackendlessUser();
user.setEmail(email);
user.setPassword(password);
user.setProperty("name", name);
showProgress(true);
Backendless.UserService.register(user, new AsyncCallback<BackendlessUser>() {
@Override
public void handleResponse(BackendlessUser response) {
showProgress(false);
Toast.makeText(Register.this, "Successfully registered!", Toast.LENGTH_SHORT).show();
Register.this.finish();
}
@Override
public void handleFault(BackendlessFault fault) {
Toast.makeText(Register.this, "Error" + fault.getMessage(), Toast.LENGTH_SHORT).show();
}
});
}
else{
Toast.makeText(Register.this, "Passwords Don't Match!", Toast.LENGTH_SHORT).show();
}
}
}
});
}