Examples

Provides example snippets to understand the use of SDMConnectivity APIs.

Creating and adding requests

//create and fill parameters for Connectivity library
SDMConnectivityParameters params = new SDMConnectivityParameters();
params.setUserName("test");
params.setUserPassword("testpwd");
mLogger = (ISDMLogger) new SDMLogger();
mPreferences = new SDMPreferences(getApplicationContext(), mLogger);
//create the RequestManager
mRequestManager = new SDMRequestManager(mLogger, mPreferences, params, 2);
ISDMRequest testRequest = new SDMBaseRequest();
testRequest.setRequestUrl("http://test.de:8080/testpath");
testRequest.setRequestMethod(ISDMRequest.REQUEST_METHOD_GET);
testRequest.setPriority(ISDMRequest.PRIORITY_NORMAL);
//add the request to the connectivity layer
mRequestManager.makeRequest(testRequest);