Hi ,
My question is that is it possible to synchronize if we are using only user and activation code for login instead of using the SCC credentials (supAdmin and s3pAdmin) ?
I developed an android native application in which I am able to synchronize when I login to the application with the SCC login credentials (supAdmin and s3pAdmin).
Code used:
try {
ConnectionProperties connProps = app.getConnectionProperties();
connProps.setServerName(HOST);
connProps.setPortNumber(PORT);
ApprovalDB.setApplication(app);
LoginCredentials loginCredentials = new LoginCredentials(
USERNAME, PASSWORD);
connProps.setLoginCredentials(loginCredentials);
if (app.getRegistrationStatus() != RegistrationStatus.REGISTERED) {
app.registerApplication(600);
} else {
app.startConnection(600);
}
} catch (Exception e) {
returnMsg = e.getMessage();
}
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
But when I login to the application with manually created user and activation code I am not able to synchronize. Login happens successfully and the device comes online in the SCC.
The error is "The synchronization failed because Mobilink returned authentication status 4 with value 4000"
Code used:
try {
ConnectionProperties connProps = app.getConnectionProperties();
connProps.setServerName(HOST);
connProps.setPortNumber(PORT);
ApprovalDB.setApplication(app);
LoginCredentials loginCredentials = new LoginCredentials(
USERNAME, PASSWORD);
connProps.setActivationCode(PASSWORD);
connProps.setLoginCredentials(loginCredentials);
if (app.getRegistrationStatus() != RegistrationStatus.REGISTERED) {
app.registerApplication(600);
} else {
app.startConnection(600);
}
} catch (Exception e) {
returnMsg = e.getMessage();
}
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Finally the code used for synchronization is
ConnectionProfile connectionProfile = ApprovalDB
.getSynchronizationProfile();
connectionProfile.setServerName("server ip");
connectionProfile.setPortNumber(2480);
connectionProfile.setNetworkProtocol("http");
connectionProfile.setAsyncReplay(true);
connectionProfile.setDomainName("default");
connectionProfile.save();
PersonalizationParameters param = ApprovalDB
.getPersonalizationParameters();
param.setPK_CODE(1234);
param.save();
Log.d("Subscribe", "Start");
ApprovalDB.subscribe();
Log.d("Subscribe", "End");
ApprovalDB.submitPendingOperations();
ApprovalDB.disableChangeLog();
ApprovalDB.synchronize();
SynchronizationGroup sg = ApprovalDB
.getSynchronizationGroup("SynchronizationGroup1");
sg.setEnableSIS(true);
sg.save();
ApprovalDB.synchronize();
-----------------------------------------------------------------------------------------------------------------------------------
Can anyone give a solution.