Initialize the client connection with application context, application name, domain,security configuration and request manager.
public static Logger logger; public static Preferences pref; public static ConnectivityParameters param; public static RequestManager reqMan; logger = new Logger(); pref = new Preferences(getApplicationContext, logger); pref.setBooleanPreference(IPreferences.PERSISTENCE_SECUREMODE, false); pref.setIntPreference(IPreferences.CONNECTIVITY_HTTPS_PORT, 443); pref.setIntPreference(IPreferences.CONNECTIVITY_CONNTIMEOUT, 70000); pref.setIntPreference(IPreferences.CONNECTIVITY_SCONNTIMEOUT, 70000); param = new ConnectivityParameters(); param.setUserName(<username>); param.setUserPassword(<password>); reqMan = new RequestManager(logger, pref, param, 1); ClientConnection clientConnection = new ClientConnection(getApplicationContext(), <Application id>="">, <Domain>, <SecurityConfig>, <RequestManager object>="">);
Note: Setting username and password in requestManager as part of param is mandatory.