cancel
Showing results for 
Search instead for 
Did you mean: 

Could not register the Native Application for Adnroid with SUP 2.1.2

Former Member
0 Kudos

Hi,

I want to register the device in SUP 2.1.2:

        Application application = Application.getInstance();

        application.setApplicationIdentifier("SimpleMBO");

        //ApplicationCallback applicationCallback = new MyApplicationCallback();

        //application.setApplicationCallback(applicationCallback);

        application.setApplicationContext(SUPApplicationActivity.this);

      

        ConnectionProperties connectionProperties = application.getConnectionProperties();

        connectionProperties.setServerName(SERVERNAME);

        connectionProperties.setPortNumber(PORT);

      

        LoginCredentials loginCredentials = new LoginCredentials(USERNAME,USERPASSWORD);

        connectionProperties.setLoginCredentials(loginCredentials);

        MBOSimpleProjectDB.setApplication(application);

      

        if (application.getRegistrationStatus() != RegistrationStatus.REGISTERED){

            try {

                application.registerApplication(100);

                Log.d(tag, "Complete register");

            } catch (Exception e) {

                Log.d(tag, "Error register: " + e);

            }

        }

        else {

            try {

                application.startConnection(100);

                Log.d(tag, "Complete start");

            } catch (Exception e) {

                Log.d(tag, "Error start: " + e);

            }

        }

But I have error  'Could not connect to server. Verify Relay Server URL Template'.

I do not use Relay Server. Help me please.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Pavel,

you could read more about it in one of my blog post http://scn.sap.com/community/mobile/blog/2012/05/02/sup-212-native-android-mbo-non-doe-based-approac...

I hope that will help you to some extent.

Regards,

Srinivas Divakarla

rakshit_doshi
Active Contributor
0 Kudos

Did you say help to some extent???  Your blog is the solution for it...Awesome work and research..

Former Member
0 Kudos

I'm sorry, I do not understand. What is the "Activation Code()", where to install it? when register a new application connection?

0 Kudos

Yes, when you register a new Application Connection in the SCC (SCC->Applications->Applications Connections -> New) you have to set the Activation Code for this device user.

This have to be the same like the ActivationCode() in the Source Code.

Former Member
0 Kudos

Thanks, but i have error: com.sybase.mobile.ApplicationRuntimeException: TM Error:InvalidValCode

Former Member
0 Kudos

I solved the problem, thanks

Former Member
0 Kudos

Hi Pavel,

how did you solve the Problem. I hava also the InvalidValCode Error

Regards Daniel

Former Member
0 Kudos

Hi Daniel,

you have correct values username and userpassword?

Former Member
0 Kudos

Hi,

I am also facing the same problem "InvalidValCode". I have checked username and password. Pls share if you have any solution.

Former Member
0 Kudos

Hi,

I also guess the InvalidValCodeError is an Username/Password Issue (see pictures below).

But now i got another problem: i changed the "Username/Password" to an not existing combination and then i got another Error-Message:

Regards Daniel

tahir_z
Contributor
0 Kudos

Hello Daniels,

Have you resolved the problem ? I am having same error code as "TM Error:InvalidValCode"

Thnx in advance

Tahir

midhun_vp
Active Contributor
0 Kudos

Hi Tahir,

Please post your code as a separate post to find the error in the code.

Regards

Midhun

rakshit_doshi
Active Contributor
0 Kudos

Yes you can solve this error..Its very simple..

Delete the application from your emulator if u are running on it. Delete the same device from the SCC.

If you are using a device then delete the application and restart the device and install again.

It will solve the error.

Let me know if the error still persists.

tahir_z
Contributor
0 Kudos

Hi Rakshit,

It worked for me thanks..:)

Regards

Tahir

rakshit_doshi
Active Contributor
0 Kudos

You are welcome. Rate this answer as correct for further reference to others.

Answers (0)