Vérifié le journal pour cela .. Méthode onDestroy() est appelée à la place de onHandleIntent() J'utilise deux services d'intention, et ont écrit un code similaire pour les deux ... mais on court tout le temps sauf pour le second serviceInservice (code attaché) ... parfois il fonctionne et parfois il ne le fait pas sans changer quoi que ce soit dans tout le projet. quelqu'un peut-il s'il vous plaît aider?Android IntentService onDestroy étant appelé au lieu de onHandleIntent
public class GetDataService extends IntentService {
private static final String TAG="GetDataService";
public GetDataService(){
super("GetDataService");
}
@Override
protected void onHandleIntent(Intent intent) {
GetDataTask task= new GetDataTask();
Log.d(TAG,intent.getStringExtra(GetDataTask.INSTA_TOKEN_URL));
task.execute(this,intent);
ApplicaitonsData.GetDataServiceRunning=true;
Log.d(TAG,"data service running status = "+ ApplicaitonsData.GetDataServiceRunning);
}
@Override
public void onDestroy() {
super.onDestroy();
ApplicaitonsData.GetDataServiceRunning=false;
Log.d(TAG,"data service running status = "+ApplicaitonsData.GetDataServiceRunning);
}
}