cancel
Showing results for 
Search instead for 
Did you mean: 

SUP2.1.3 Android register Application error when 2nd time login

Former Member
0 Kudos

Hi All,

I success to login and sync the MBO to the simulator for the first time I launch the Android simulator on the debugging mode, but I encounter a problem when the second time I launch the Android simulator (using the existing android simulator, not launch the new simulator), the process register the application again and stopped there. May I know how to solve the problem?

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

{

    app.registerApplication(TIMEOUT); <-- process stopped here

}

else

{

    app.startConnection(TIMEOUT);

}

Thank you in advance.

Regards

Choong

Please help.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

It is common problem with the Android emmulator, for second time re-launch of the ADT what you have to do is you have re-register the SUP user, whereas from the device you will encounter the problem.

Former Member
0 Kudos

Hi Srinivas,

That is my temporary solutions at the moment, wonder to know whether this problem will happen on the real Android device?

Former Member
0 Kudos

Hi Choong,

Basically this issue you will not be able to face in a real device, the reason being basically what happens, Android emmulator acts as a device with a unique ID (just like UDID for iPhone simulator), so while registering in SCC what it does is it forms a unique string with deviceID+application name + package name and SUP user credentails.

The reason you see such behaviour only with android emmulator is, you can always run a multiple instance of android emmulator which is not the case in iPhone simulatord so the device ID keeps on changing every time when you re-launch the application. where as a physical device's device ID never changes.

So it will definitely work properly in the device.

Hope it explains the problem

Regards,

Srinivas Divakarla

Former Member
0 Kudos

Hi Srinivas Divakarla,

That's very helpful information. Thanks for your help.

Regards,

Choong

Former Member
0 Kudos

Hi Srinivas Divakarla,

As the root cause of this issue is register a new emulator ID to the SCC as device ID, I'm using the same emulator to debug the application which I checked the device ID registered in the SCC is same as the previous device ID and the process hang at the point I mentioned in the previous post.

Step I did is the following:

1. Start debug the application with a new emulator.

2. End the application debugging remain the emulator starting.

3. change of the application and debug the application with existing emulator.

4. process hang at the point when register the application to the SCC

app.registerApplication(TIMEOUT); <-- process hang here

Please advice.

Regards,

Choong

midhun_vp
Active Contributor
0 Kudos

Uninstall the app in simulator each time when you are debugging/running.

Former Member
0 Kudos

I tried but its not work.

Former Member
0 Kudos

Hi ,

I tried to install the application to the Android device and facing the same problem.

May I know to troubleshooting the problem?

Regards,

Choong

Answers (2)

Answers (2)

Former Member
0 Kudos

HI,

Latest update. The SUP android application able to run after I clean the application data in device everytime. I think there is some cache in the application to cause the SUP android application register fail.

Please help.

Regards,

Choong

Former Member
0 Kudos

Hi All,

Anybody can help ? I tried with the SUP101 sample and facing the same problem, welcome for your input.

Regards,

Choong

midhun_vp
Active Contributor
0 Kudos

What is the error you are getting?

I code I followed is:

try{

                                                  app = Application.getInstance();

                                                  if (app.getApplicationIdentifier() == null){

                                                  app = Application.getInstance();

                                                  app.setApplicationIdentifier("Manager");

                                                  app.setApplicationContext(ServerSettingsScreen.this);

                                        }

                                         }catch (Exception e) {

                                                   Toast.makeText(getBaseContext(),"ERROR-->"+e, Toast.LENGTH_SHORT).show();

                                        }catch (ExceptionInInitializerError e) {

                                                  Toast.makeText(getBaseContext(),"ERROR-->"+e, Toast.LENGTH_SHORT).show();

                                        }

--------------------------------------------------------------------------------------------------------

try{

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

                                                            app.registerApplication(600);

                                                  } else {

                                                            app.startConnection(600);

                                                  }

                                        } catch (Exception e) {

                                                  returnMsg = e.getMessage();

                                        }

Former Member
0 Kudos

Hi Midhun VP,

The project didnot return error and the process hang over there, end up get the ApplicationTimeoutException.

Do you encounter this problem when you using emulator?