bind
Bind the API server to the given Activity. This will initialize the API server and enable calling API methods.
Parameters
the activity the service will get bound to. I.e. the lifecycle of the API service will be the same as this Activity.
Bind the API server to the given Context. This will initialize the API server and enable calling API methods.
Parameters
the context the service will get bound to. Depending on the type of context provided (Application, Activity, or Service), the API service will have a different lifecycle: Application context: The API service will have the same lifetime as the application and will persist across all activities and services. Activity context: The API service will have the same lifetime as the activity and will be destroyed when the activity is destroyed. Service context: The API service will have the same lifetime as the service and will be destroyed when the service is destroyed.