code: public void login(String username, String password) {
          Object[] methodArgs = new Object[1];
          if (username != null && username.indexOf('@') > 1) {
              EmailAuth emailpass = new EmailAuth(username, password);
              methodArgs[0] = emailpass;
          } else {
              UsernameAuth userpass = new UsernameAuth(username, password);
              methodArgs[0] = userpass;
          }
          
          getDDP().call("login", methodArgs, new DDPListener() {
              @Override
              public void onResult(Map<String, Object> jsonFields) {
                  handleLoginResult(jsonFields);
              }
          });
      }
docs: Logs in using username/password
  @param username username/email
  @param password password