Skip to content

Commit

Permalink
Merge pull request #31 from charithag/master
Browse files Browse the repository at this point in the history
Fix authentication issue non debuggable devices
  • Loading branch information
charithag authored Apr 21, 2017
2 parents 36f2b13 + bda31a7 commit e969fbf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion client/client/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ android {
targetSdkVersion 23
multiDexEnabled true

versionCode 325
versionCode 326
versionName "3.1.13"
}
buildTypes {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,13 +87,14 @@ private void login(final String userName, final String password) {
public void onResponse(String response) {
if (Constants.DEBUG_MODE_ENABLED) {
Log.d(TAG, "Login Response: " + response);
if (response != null && response.trim().equals("true")) {
callback.onAuthenticationSuccess();
requestTenantDetails();
} else {
callback.onAuthenticationFail();
}
}
if (response != null && response.trim().equals("true")) {
callback.onAuthenticationSuccess();
requestTenantDetails();
} else {
callback.onAuthenticationFail();
}

}
},
new Response.ErrorListener() {
Expand Down Expand Up @@ -157,10 +158,11 @@ private void requestTenantDetails() {
public void onResponse(String response) {
if (Constants.DEBUG_MODE_ENABLED) {
Log.d(TAG, "Tenant details Response: " + response);
Gson gson = new Gson();
List<Tenant> tenants = gson.fromJson(response, new TypeToken<List<Tenant>>(){}.getType());
callback.onTenantResolved(tenants);
}
Gson gson = new Gson();
List<Tenant> tenants = gson.fromJson(response,
new TypeToken<List<Tenant>>() {}.getType());
callback.onTenantResolved(tenants);
}
},
new Response.ErrorListener() {
Expand Down

0 comments on commit e969fbf

Please sign in to comment.