I have this code below that basically is the Login process of my app, Why do i have null pointers? Have I implemented it correctly, I have tried to use static for AsyncTask to avoid any memoryleak.
Login.java
if (handler.executeLog(username.trim(), password.trim())) {
session.saveLogin(username, password);
Toast.makeText(this, "Successfully Logged In", Toast.LENGTH_SHORT).show();
Intent log = new Intent(this, MainActivity.class);
startActivity(log);
handler.close();
finish();