I want to close my clas开发者_StackOverflow中文版s for stopService();
, and i am using this method but i know that it's false , please help me:
if (Main_Page.this.finish() == true){
stopService(svc);
}
Thank you ...
use this
public void onDestroy(){
super.onDestroy();
stopService(new Intent(this,yourservice.class));
}
if you want to stop your service .. then do that in onDestroy() call back of your activity
public void onDestroy(){
super.onDestroy();
stopService(svc);
}
精彩评论