ClientConnection(Context, String, String, String, SDMRequestManager) constructor

Initialize the client connection with application context, application name, domain,security configuration and request manager.

Syntax

public ClientConnection (
    Context context,
    String appID,
    String Domain,
    String securityConfig,
    SDMRequestManager requestManager
)

Parameters

Remarks

Note: Setting username and password in requestManager as part of param is mandatory.

Example 1

                               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>="">);