I've recently found a code that could solve my background service problem, but I don't understand one part of it. Could you tell me what should I write in !calledOtherActivity? This part is red in my code and the hint says: " cannot resolve symbol 'calledOtherActivity' "
Code
@Override
public void onPause() {
if(!isFinishing()){
if(!calledOtherActivity){
stopService(serviceRef);
}
}
}