Login


When you first open app you will be directed to login screen. You must provide a valid Healthix account details. After tapping the next button you will be forwarded to password screen.

   /**
         * Check for login Session
         */
        if (sessionManager.isLoggedIn()) {
            if (sessionManager.getUserDetails().get(sessionManager.KEY_ROLE).equals("doctor")) {
                //Go to Doctor Section
                Intent splash = new Intent(getApplicationContext(), HospitalActivity.class);
                startActivity(splash);
            } else if (sessionManager.getUserDetails().get(sessionManager.KEY_ROLE).equals("pharmacist")) {
                //Go to Pharmacy Section
                // Intent splash = new Intent(getApplicationContext(), PharmacyActivity.class);
                //   startActivity(splash);
            }
        } else {


            //Setup Views
            inputLayoutName = (TextInputLayout) findViewById(R.id.input_layout_email);
            inputLayoutPassword = (TextInputLayout) findViewById(R.id.input_layout_password);
            inputEmail = (EditText) findViewById(R.id.input_email);
            inputPassword = (EditText) findViewById(R.id.input_password);
            btnLogin = (Button) findViewById(R.id.btn_login);
            alertPopup = new AlertPopup();

            //ChangeListener detects changes in text
            inputEmail.addTextChangedListener(new MyTextWatcher(inputEmail));
            inputPassword.addTextChangedListener(new MyTextWatcher(inputPassword));

            //button login listener
            btnLogin.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View view) {
                    submitForm();
                }
            });
        }

    }

If login is enabled for your account, your Healthix provider's dashboard will be opened in screen.Alert pop Dialogs are used to show response and login error.

It uses Android - Session Manager to check is user is logged in or not and also to save session data .You can also see Android - Session Manager.

Users can also login using their fingerprint which is registred to the phone for authentication into the app.

results matching ""

    No results matching ""