+ Start a Discussion
Narinder Singh 1Narinder Singh 1 

Logout from a native Android app built using Mobile SDK

I can't figure out how to implement Logout in my app built using the Android Mobile SDK. Is there a class or utility method which does this?
Best Answer chosen by Narinder Singh 1
Gaurav KheterpalGaurav Kheterpal
Try this
 
public void onLogoutClick(View v) {

        SalesforceSDKManager.getInstance().logout(this);
    }
This will use the SalesforceSDKManager class and call its logout function. You can see some sample apps shipped with Android SDK for examples.
 

All Answers

Gaurav KheterpalGaurav Kheterpal
Try this
 
public void onLogoutClick(View v) {

        SalesforceSDKManager.getInstance().logout(this);
    }
This will use the SalesforceSDKManager class and call its logout function. You can see some sample apps shipped with Android SDK for examples.
 
This was selected as the best answer
Joerian GautenJoerian Gauten
I know this is an old post, but does it mean the onLogoutComplete is not used? is the result of logout always successful?