SalesforceActivity, SalesforceListActivity, and SalesforceExpandableListActivity Classes
SalesforceActivity, SalesforceListActivity, and SalesforceExpandableListActivity are the skeletal base classes for native SDK activities. They extend android.app.Activity, android.app.ListActivity, and android.app.ExpandableListActivity, respectively.
Each of these activity classes contains a single abstract method:
1public abstract void onResume(RestClient client);This method overloads the Activity.onResume() method, which
is also implemented by the class. The Mobile SDK superclass
delegate, SalesforceActivityDelegate, calls your overload
when it has created a RestClient instance. Use this method
to cache the client that’s passed in, and then use that client to perform your REST
requests. For example, in the Kotlin Mobile SDK template
app, the MainActivity class uses the following
code:
1override fun onResume(client: RestClient) {
2 // Keeping reference to rest client
3 this.client = client
4
5 // Show everything
6 findViewById<ViewGroup>(R.id.root).visibility = View.VISIBLE
7}