0

I am trying to register my native application to the Sybase Control Center, but I always get the Invalid Authentication Parameters.

The problem is, that my Application and connection profile disappeared from the SCC and I cant recreate it.

Also, I created a new connection profile, but the activation code is grayed out and blank, so I cannot restore it.

I already tried unregistering/registering, reinstalling the app on the emulator, but the Error 580 persists. I cannot declare the app on the SCC manually again, so I am now in a dead end, and without any fresh ideas.

Any suggestions? (below is my code, assume that the SCC is brand new, without any registered apps)

writeToLog("STARTING SYNC THREAD...");
                app.setApplicationContext(ZServicesActivity.this); // context is the android.content.Context
                //SMPNostrumDB.getSynchronizationProfile();                                                                                                   
                
                //-----------------------Connection Properties---------------------------  
                writeToLog("SETTING Connection PROPERTIES...");                       
                ConnectionProperties connProps = app.getConnectionProperties();
                connProps.setServerName(SERVER_172);
               // connProps.setServerName(PUBLIC_SERVER);  
                connProps.setPortNumber(MSG_SERVER_PORT);
                connProps.setActivationCode(ACTIVE_CODE);  
                connProps.setFarmId("0");                              
                writeToLog("CONN Properties are SET.");  
                
                SMPNostrumDB.setApplication(app); // Set the android.content.Context for the application
                LoginCredentials loginCredentials = new LoginCredentials(USER,PWD);
                connProps.setLoginCredentials(loginCredentials);                             
                writeToLog("Login Credentials, SET.");

                if (app.getRegistrationStatus() != RegistrationStatus.REGISTERED) {                     
                    //app.unregisterApplication();
                    //writeToLog("...your nemesis");
                    writeToLog("REGISTERING App...");  
                    connProps.setActivationCode(ACTIVE_CODE);    
                    app.registerApplication();    
                    
                    writeToLog("APP REGISTERED...");  
                    progressConnection.dismiss();                         
                    }   
                else{                                
                    writeToLog("App already created, CONNECTING..."); 
                    app.startConnection(10000);                         
                    writeToLog("APP CONNECTED...");                                                                                                     
                    }
                
              //-----------------------Connection Profile---------------------------  
                writeToLog("SETTING Connection PROFILE...");                
     
                ConnectionProfile connectionProperties=SMPNostrumDB.getSynchronizationProfile();
                writeToLog("    (CP): APP DB and Server, are SET.");
                connectionProperties.setServerName(SERVER_172);
                connectionProperties.setPortNumber(SYNC_SERVER_PORT);                
                writeToLog("Connection PROFILE is SET.");    

                writeToLog("APP CONNECTED...");
                progressConnection.dismiss();   
                                              
                app.setApplicationCallback(new MyApplicationCallback());
                SMPNostrumDB.registerCallbackHandler(new MyCallbackHandler());
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Josh
  • 6,251
  • 2
  • 46
  • 73
  • Which SUP version you are using? – jhamu Sep 03 '14 at 06:51
  • Hi @jhamu the code finally worked and I was able to finish an app prototype in which sends a code to SAP and recovers a reply string. After much struggling it runs smoothly!, check out my answer. After this particular problem I also faced many other landmines before it finally worked. – Josh Sep 03 '14 at 07:26

1 Answers1

0

I am using SUP 2.3.3, and after a few days of waiting for a reply, a SAP consultant recommended me to leave out the activation code. I removed all traces of the activation code from my android side code, and it WORKED! so I was able to move to close this chapter and move on with the app development.

Josh
  • 6,251
  • 2
  • 46
  • 73