You could set a shared state variable in the onStop or onPause events.
Then retrieve it when needed.
// In your declarations:
protected static int status = 0;
// ...
@Override
protected void onPause()
{
// TODO Auto-generated method stub
super.onPause();
staus = 1;
}
@Override
protected void onStop()
{
// TODO Auto-generated method stub
super.onStop();
staus = 2;
}
// Then, wherever in your code (even in other activities) you can check the
// value of status. And even reset it to its initial value, 0