Android application login error ArcGIS 10 services to ArcGIS 10.1 services migration

Discussion created by Anjithalk on May 6, 2014
I use Android ArcGIS 10.1.1 SDK for android application. It utilize secure services with token based authentication. I have no problem using same application with ArcGIS server 10 but 10.1 return me login screen always with "invalid username/password" but I can login using rest interface with out any issue and web applications can consume same service.

below is my code (application originally developed by ESRI and we are facing difficulties to migrate this application)

public UserLoginTask(LoginModel model)
  listenerMap = new HashMap<String, CopyOnWriteArrayList<EventListener>>();
  this.model = model;
  username = model.getUsernameView().getText().toString();
  password = model.getPasswordView().getText().toString();
  tokenserviceUrl = model.getTokenServiceUrl();
  inpsectorsTableRestUrl = model.getInspectorTableRestUrl();
  uc = new UserCredentials();  
  SelfSignedCertificateHandle.setOnSelfSignedCertificateListener(new OnSelfSignedCertificateListener() { //arcgis 10.1.1
   public boolean checkServerTrusted(X509Certificate[] chain, String authType) {
    try {
         } catch (Exception e) {
           return  true;

         return true;      

Any help ?