My app has 3 classes. First class is a splash screen, second class contains a list of playlists and third class that playlist's content. When a playlist is selected that third class get started to show the playlist content. On second class I have :
@Override
protected void onStop() {
super.onStop();
System.out.println("onStop Playlist!!!!");
}
protected void onDestroy() {
super.onDestroy();
System.out.println("onDestroy Playlist");
}
and when third class is ready to start, I get on DDMS the messages :"onStop Playlist!!!!"
and "onDestroy Playlist"
. Why are this method called? Shouldn't be called only onPause
method? The problem is that I want to stop some timer when app is finishing, but I don't know in this case where can I stop the timer. Any idea?
I call the third class like this :
Intent i = new Intent(getBaseContext(), ViewPlaylist.class);
i.putExtra("id", idPlaylist[position]);
i.putExtra("timer", timerPlaylist[position]);
startActivity(i);
finish();
The problem is that I call finish()
?