Showing results for 
Search instead for 
Did you mean: 

Android Sample App - Password Incorrect

I'm not sure if this the right place to get help... please forgive....


i've setup the Android Sample Application, but i cannot log in, i keep getting "This password is incorrect" yet i can login without problem on the sandbox site.

what gives? is there a setting on the site that i need to change?
a value in the app that needs a change?
please help me get thru so i can use it for my project.

Hi cmklar123,

All our sample application defaults to sandbox so you want to make sure you are using the correct environment.




Administrator Administrator

Can you please explain how to modify so the app works in production mode. I am also having the same issue logging. I can login to sandbox via web but i am not able to login via sample app.

Hello @amormemorials1 


If you are using the sample application from you would change Environment.SANDBOX to Environment.PRODUCTION.


    /** Authenticates the user-name and password using the VIEW. */
    public void authenticate(View view) {
        String loginID = ((EditText) findViewById(;
        String password = ((EditText) findViewById(;
        PasswordAuthentication loginCredentials = PasswordAuthentication.createMerchantAuthentication(loginID, password, deviceID);
        _merchant = Merchant.createMerchant(Environment.SANDBOX, loginCredentials);


Great, i did. I still contnue to get "The password is incorrect" I am able to login on my account via web, i have also tries my sanbox account and i get the same error. Any Ideas please. Thank you

Could you please confirm the specific error response code you are receiving?


Remember that you cannot use your sandbox Login ID and Password with the Production environment, or Production credentials with the sandbox.

I am running the sample without any changes, and when i enter login and password and tap LOG IN the progress circle spins and then i get a small black box at the right of password which states"The password is incorrect" i then make the change you advised above from SANBOX to PRODUCTION and i get the same error. 


Now if i do the same test on the app from Play Store i am able to login with the same credentials (PRODUCTION) with no errors. This is confusing me out.





Also just so you know, i dont even get the message that says that i need to enable the device via the web.

Can this help? This is what i see on android studio after i tap login.


11-14 21:13:49.521 8659-8659/ D/OpenGLRenderer﹕ Enabling debug mode 0
11-14 21:14:34.191 8659-8659/ D/dalvikvm﹕ GC_FOR_ALLOC freed 1243K, 17% free 21343K/25596K, paused 14ms, total 14ms
11-14 21:14:34.271 8659-8816/ W/System.err﹕ [DEBUG] GbaRequest - GbaRequest: Constructor Called 222 userAgent Apache-HttpClient/UNAVAILABLE (java 1.4)
11-14 21:14:34.271 8659-8816/ W/System.err﹕ [DEBUG] NafRequest - NafRequest: NafRequest constructor===useragent Apache-HttpClient/UNAVAILABLE (java 1.4)
11-14 21:14:34.301 8659-8659/ D/ProgressBar﹕ updateDrawableBounds: left = 0
11-14 21:14:34.301 8659-8659/ D/ProgressBar﹕ updateDrawableBounds: top = 0
11-14 21:14:34.301 8659-8659/ D/ProgressBar﹕ updateDrawableBounds: right = 228
11-14 21:14:34.301 8659-8659/ D/ProgressBar﹕ updateDrawableBounds: bottom = 228



What does the UNAVAILABLE mean? Thank you



Our developers are unable to duplicate the issue as you describe, but they have some suggestions:


  1. The developer can always inspect ‘loginResult’ for the actual cause of login failure. There are usually two causes:
    1. The Android device does not have internet connection
    2. The Android device ID is not set correctly by the developer in the Sample App code. The Sample App does not have “DeviceRegistration” demo path, so the developer needs to get a registered device id from their test account and set it in the code.

On GitHub, we also submitted a pull request to include more robust error messages.