cancel
Showing results for 
Search instead for 
Did you mean: 

How logout from an app?

ashwin_narayan
Participant
0 Kudos

Hi Experts,

I'm using mobile library for creating an application....Iam using a shell and i have a app inside it...

The app contains various views inside it...What I'm trying to achieve is ..I want to logout from a particular view,

ie i just want to logout functions for that view or views.

How will i achieve that?

Thanks,

Ashwin

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

I stongly advice you to manage your logon procedure with kapsel plug-in. It is easy to implement.

ashwin_narayan
Participant
0 Kudos

Hi,

I will certainly check for the same

Thanks,

Ashwin    

midhun_vp
Active Contributor
0 Kudos

Hi Ashwin,

How you are logged in to the app ? What's the underlying technology. Are you using SAP Mobile Platform ?


Regards, Midhun

SAP Technology RIG

ashwin_narayan
Participant
0 Kudos

Hi Midhun,

Yea im working on mobile platform.I want to  access the logout button of the shell to only particular views so that will help me logout from the views and push me back to login...

Thanks,

Ashwin

midhun_vp
Active Contributor
0 Kudos

Hi Ashwin,

What is the type of application you developed (syclo/native/hybrid)?

Could you elaborate the requirement. What do you mean by logout from views ? How you are logged into the app?

In SMP, when you are logged into SMP server from the application it creates a user in the server. When the user logout from the app it deletes the user from the SMP server.

You can use below code for logout:

App based on native Odata SDK:

private void doLogout() {

//delete registered user

logonUIFacade.deleteUser();

}

Hybrid app that uses kapsel logon plugin:

sap.Logon.core.deleteRegistration(logonUnregisterSuccessCallback, unRegisterErrorCallback);

Regards, Midhun

SAP Technology RIG

former_member183212
Participant
0 Kudos

Hi Midhun,

   thanks for you advice, i'm looking for this solution too. i'm working on Hybird app development, i found the logon.js provided in the Kapsel project has the function doDeleteRegistration . however the codes written by SAP confused me , see the screenshot bellow. why in the success call back function we need to call the sap.AppUpdate.reset(); methond? i just wanna logout , not reset the app.

any advice?

thanks,

Billy