public abstract class SalesforceReactActivity extends ReactActivity implements SalesforceActivityInterface
| Modifier | Constructor and Description |
|---|---|
protected |
SalesforceReactActivity() |
| Modifier and Type | Method and Description |
|---|---|
void |
authenticate(Callback successCallback,
Callback errorCallback)
Method called from bridge to authenticate.
|
ClientManager |
buildClientManager() |
protected ReactActivityDelegate |
createReactActivityDelegate() |
void |
getAuthCredentials(Callback successCallback,
Callback errorCallback)
Method called from bridge to get auth credentials.
|
RestClient |
getRestClient()
Returns an instance of RestClient.
|
protected void |
login() |
void |
logout(Callback successCallback)
Method called from bridge to logout.
|
protected void |
onCreate(Bundle savedInstanceState) |
void |
onDestroy() |
void |
onErrorAuthenticateOffline()
Called if shouldAuthenticate() returned true but device is offline.
|
boolean |
onKeyUp(int keyCode,
KeyEvent event) |
void |
onLogoutComplete()
Performs actions on logout complete.
|
void |
onPause() |
void |
onResume() |
void |
onResume(RestClient c)
Method that is called after the activity resumes once we have a RestClient.
|
void |
onUserSwitched()
Performs actions on user switched.
|
protected void |
restartReactNativeApp() |
protected void |
setRestClient(RestClient restClient) |
boolean |
shouldAuthenticate()
Returns if authentication should be performed automatically or not.
|
protected boolean |
shouldReactBeRunning() |
void |
showReactDevOptionsDialog() |
public boolean shouldAuthenticate()
public void onErrorAuthenticateOffline()
protected void onCreate(Bundle savedInstanceState)
public void onResume()
public void onResume(RestClient c)
SalesforceActivityInterfaceonResume in interface SalesforceActivityInterfacec - RestClient instance.public void onPause()
public void onDestroy()
public boolean onKeyUp(int keyCode,
KeyEvent event)
public void showReactDevOptionsDialog()
protected void login()
public void logout(Callback successCallback)
successCallback - Success callback.public void authenticate(Callback successCallback,
Callback errorCallback)
successCallback - Success callback.errorCallback - Error callback.public void getAuthCredentials(Callback successCallback,
Callback errorCallback)
successCallback - Success callback.errorCallback - Error callback.public RestClient getRestClient()
protected void setRestClient(RestClient restClient)
public ClientManager buildClientManager()
public void onLogoutComplete()
SalesforceActivityInterfaceonLogoutComplete in interface SalesforceActivityInterfacepublic void onUserSwitched()
SalesforceActivityInterfaceonUserSwitched in interface SalesforceActivityInterfaceprotected ReactActivityDelegate createReactActivityDelegate()
protected boolean shouldReactBeRunning()
protected void restartReactNativeApp()