Hi,

I'm not sure why onPause() is not called in the following scenario.
Here's my activity:

// launchMode = "singleTask"

public class ActivityMain extends Activity {
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        Log.d("$$", "onCreate()..." + getTaskId());
    }

    @Override
    protected void onPause() {
        super.onPause();

        if (isFinishing()) {
            Log.d("$$", "onPause()..." + getTaskId());
        }
    }

    @Override
    protected void onNewIntent(Intent intent) {
        super.onNewIntent(intent);

        Log.d("$$", "onNewIntent()..." + getTaskId());
        finish();
    }
}

I launch my activity from the app tray, then hide it by hitting the
home key. So the app is running.
I then launch the browser, do a url-click action which should launch
this activity again (via an intent-filter).

I see the onNewIntent() method called. The task id and mem address is
the same as the original instance, so I know this is the original one
getting recycled. I do not see the onPause() method called though,
even though finish() is being called. Shouldn't the call to finish()
kill this one and only activity in this task?

The log output looks like this:

onCreate()...54
onNewIntent()...54
[missing onPause()...54]?

Thanks

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to