AnsweredAssumed Answered

AccountManager not recognised by Android Studio

Question asked by Mudassar on Oct 19, 2015
Latest reply on Oct 21, 2015 by Mudassar

Hi , This is my code.

 

XMPPTCPConnectionConfiguration.Builder configBuilder = XMPPTCPConnectionConfiguration.builder();
     configBuilder.setUsernameAndPassword("X@X.com", "XXX");
   //configBuilder.setResource("test");
     configBuilder.setPort(5222);
     configBuilder
.setCustomSSLContext(context);
     configBuilder
.setDebuggerEnabled(true);
//configBuilder.setSocketFactory(SSLSocketFactory.getDefault());
     configBuilder
.setSecurityMode(ConnectionConfiguration.SecurityMode.required);
     configBuilder
.setHost("X.X.X.X");
     configBuilder
.setServiceName("X.com");  
     SASLMechanism mechanism = new SASLPlainMechanism();
     SASLAuthentication.registerSASLMechanism(mechanism);
     SASLAuthentication.blacklistSASLMechanism("SCRAM-SHA-1");
     SASLAuthentication.blacklistSASLMechanism("DIGEST-MD5");
     SASLAuthentication.unBlacklistSASLMechanism("PLAIN");  

     final XMPPTCPConnection connection = new XMPPTCPConnection(configBuilder.build()); 

     try
{ 
          connection
.connect();
          Log.i("App1-conn","CONENCTION WORKS");

                     AccountManager accountmanager =null;

 

Now I have imported org.jivesoftware.smack.*; But the Android Studio Says Cannot Recognize AccountManager. (Although It allows me to make object of simple MANAGER CLASS (shows in intellisense) but of not AccountManager.

 

The grandle File is

compile "org.igniterealtime.smack:smack-android:4.1.0"
compile "org.igniterealtime.smack:smack-tcp:4.1.0"

 

 

Flow , @Stefano , benjamin , Matt Tucker  , Gaston Dombiak CSH

Outcomes