cancel
Showing results for 
Search instead for 
Did you mean: 

Error while registerApplication (Android) in SUP

Former Member
0 Kudos

Hi Guys,

i have trouble with the registration of my Android-App to the SUP-Server.

The Code i use is mostly taken from the SUP101 Sample.

The error occurs at the code snippet below.

                     if (app.getRegistrationStatus() != RegistrationStatus.REGISTERED)

                     {

                               Log.d("Register", "App not registered");

                               connProps.setActivationCode("123");

                         app.registerApplication(TIMEOUT);

                        

                     }

Is there a problem at the Backend-Site or is this an Application Error?

The exact Error Message in DDMS:

Thanks in advance.

Daniel

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Daniel,

The below mentioned URL might be helpful to figure out the problem

http://scn.sap.com/community/mobile/blog/2012/05/02/sup-212-native-android-mbo-non-doe-based-approac...

Hope that will help you.

Regards,

Srinivas Divakarla

Former Member
0 Kudos

Hi Daniel,

The below mentioned URL might be helpful to figure out the problem

http://scn.sap.com/community/mobile/blog/2012/05/02/sup-212-native-android-mbo-non-doe-based-approac...

Hope that will help you.

Regards,

Srinivas Divakarla

Former Member
0 Kudos

Hi Srinivas,

thanks for your Answer, i already read your blog post and it was very helpful especially the hint with the Activation Code.

I've also done Step 1-3 of your post Step 4 shouldn't be relevant because i don't use a relay Server at the moment.

But now i get this Error while trying to register the Application.

Which parts of the Activity or ...DB are responsible for the Activation.

Regards,

Daniel

Former Member
0 Kudos

Hi Srinivas,

thanks for your Answer, i already read your blog post and it was very helpful especially the hint with the Activation Code.

I've also done Step 1-3 of your post Step 4 shouldn't be relevant because i don't use a relay Server at the moment.

But now i get this Error while trying to register the Application.

Which parts of the Activity or ...DB are responsible for the Activation.

Regards,

Daniel

Former Member
0 Kudos

what is the port number you are giving in the connectionProperties before doing registration ?

Former Member
0 Kudos

the Port in the Activity is "5001".

public class NewAndroActivity extends Activity {

 

    private static final int REQUEST_DETAIL = 99;

    private static String USERNAME = "user";

    private static String PASSWORD = "pass"

    private static String HOST = "myserver";

    private static int PORT = 5001;

    private static int TIMEOUT = 600;

...

Former Member
0 Kudos

If i change the Port to a wrong number i get an error message which says i have to verify my template.

So i guess the 5001 should be the right one.

The other point which confuses me is that the Device/Application is already registred but he runs into that if (app.getRegistrationStatus() != RegistrationStatus.REGISTERED).

Former Member
0 Kudos

Looks like your application is already registered in the SCC, if it is already you need not to register once again you can use start connection.

 

app.startConnection(

TIMEOUT)

Former Member
0 Kudos

I thought of that too, but the Activity runs into: app.getRegistrationStatus() != RegistrationStatus.REGISTERED.

I also tried to force app.startConnection(TIMEOUT), but then the DDMS claims that i have to register my Application first.

Now the error is more accurate:  TM Error: InvalidValCode.

Former Member
0 Kudos

Ahh, at this momment I will suggest you to delete the SUP user, and create it once again.