Initialize the client connection with application context, application name, domain,security configuration and request manager.
public static SDMLogger logger; public static SDMPreferences pref; public static SDMConnectivityParameters param; public static SDMRequestManager reqMan; logger = new SDMLogger(); pref = new SDMPreferences(getApplicationContext, logger); pref.setBooleanPreference(ISDMPreferences.SDM_PERSISTENCE_SECUREMODE, false); pref.setIntPreference(ISDMPreferences.SDM_CONNECTIVITY_HTTPS_PORT, 443); pref.setIntPreference(ISDMPreferences.SDM_CONNECTIVITY_CONNTIMEOUT, 70000); pref.setIntPreference(ISDMPreferences.SDM_CONNECTIVITY_SCONNTIMEOUT, 70000); param = new SDMConnectivityParameters(); param.setUserName(<username>); param.setUserPassword(<password>); reqMan = new SDMRequestManager(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.