当我点击一个按钮时,我正在做这件事
Intent service = new Intent(this, LocationCheckingService.class);
startService(service);如果我多次点击这个按钮,会不会导致多个线程被调用?有可能防止多个服务吗?因为我只需要一项服务
发布于 2011-05-02 04:51:20
您不能运行服务的多个实例:请参阅http://developer.android.com/guide/topics/fundamentals/services.html#StartingAService
发布于 2011-05-02 04:53:14
只能有一个服务实例。无论您启动多少次,都会看到这个discussion
https://stackoverflow.com/questions/5851230
复制相似问题