public abstract class SalesforceActivity extends AppCompatActivity implements SalesforceActivityInterface
Modifier and Type | Field and Description |
---|---|
protected boolean |
isBuildRestClientOnResumeEnabled
Determines if the Salesforce Mobile SDK (MSDK) REST Client is built when this activity
resumes.
|
Constructor and Description |
---|
SalesforceActivity() |
Modifier and Type | Method and Description |
---|---|
protected void |
onCreate(Bundle savedInstanceState) |
void |
onDestroy() |
boolean |
onKeyUp(int keyCode,
KeyEvent event) |
void |
onLogoutComplete()
Performs actions on logout complete.
|
void |
onPause() |
void |
onResume() |
void |
onUserSwitched()
Performs actions on user switched.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onResume
protected boolean isBuildRestClientOnResumeEnabled
The default is beneficial so apps using this activity as their main activity will create the MSDK networking client and start MSDK's default LoginActivity when no user is authenticated. This provides a lower-code path to implementing an app which automatically authenticates a user with Salesforce web login.
Whenever needed, an app may disable this feature. Disabling this feature gives the app more control over when and which activities are presented to the user when this activity is resumed. However, that does require the app start MSDK's LoginActivity when required and with valid parameters for the app's authentication needs.
protected void onCreate(Bundle savedInstanceState)
public void onResume()
public void onPause()
public void onDestroy()
public boolean onKeyUp(int keyCode, KeyEvent event)
public void onLogoutComplete()
SalesforceActivityInterface
onLogoutComplete
in interface SalesforceActivityInterface
public void onUserSwitched()
SalesforceActivityInterface
onUserSwitched
in interface SalesforceActivityInterface