Binding a Service to an android.app.Activity vs Binding it to an android.app.Application
问题 Is there any fundamental difference in binding a service to an android.app.Activity vs binding it to an android.app.Application . I want to bind the service to an Application because I want to keep some global state/data in the Application instead of duplicating it in all my activities. Thanks. 回答1: No. There is no fundamental difference. That said, subclassing android.app.Application is a very good place to store global/state data. There is only one instance and everything that derives from