This method is in Mainactivity.class. I want this method to be called when application destroys
@Override
protected void onDestroy() {
if (singleQuestion.size() > 0) {
LastQuestionService.answerLastQuestion(context, singleQuestion.get(0));
}
super.onDestroy();
MyLog.e(TAG, "onDestroy");
}