pressing home button to launch the web browser

by Dianne Hackborn » Sat, 23 Jan 2010 10:16:40 GMT

Sponsored Links
 Well what is the stack crawl when it crashes?

> website: 

pressing home button to launch the web browser

by Jun Sun » Mon, 25 Jan 2010 12:40:27 GMT

 ig thanks for pointing to this useful debugging feature ("adb
logcat"). I have fixed the problem.

As I suspected, the context is a system service, which is not suitable
to start an intent activity. And the error message actually gives a
clue on the fix, which is to add FLAG_ACTIVITY_NEW_TASK flag.

Below is the new snippet that works to make the record complete. I
also attached the related log output.




void showRecentAppsDialog() {
// [jsun]

Intent i = new Intent(Intent.ACTION_VIEW,
if (mRecentAppsDialog == null) {
mRecentAppsDialog = new RecentApplicationsDialog(mContext);


W/dalvikvm( 76): threadid=39: thread exiting with uncaught exception
E/AndroidRuntime( 76): Uncaught handler: thread WindowManagerPolicy
exiting due to uncaught exception^M
E/AndroidRuntime( 76): *** EXCEPTION IN SYSTEM PROCESS. System will crash.^M
I/ActivityManager( 76): Start proc for
pid=253 uid=1000 gids={3002, 3001, 3003}^M
E/AndroidRuntime( 76): android.util.AndroidRuntimeException: Calling
startActivity() from outside of an Activity context requires the
FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?^M
E/AndroidRuntime( 76): at^M
E/AndroidRuntime( 76): at^M
E/AndroidRuntime( 76): at$^M
E/AndroidRuntime( 76): at
E/AndroidRuntime( 76): at
E/AndroidRuntime( 76): at android.os.Looper.loop(^M
E/AndroidRuntime( 76): at$^M
I/Process ( 76): Sending signal. PID: 76 SIG: 9^M

On Sat, Jan 23, 2010 at 2:52 PM, Dianne Hackborn <> wrote:


Sponsored Links

Other Threads

1. Installing android SDK

When I run "SDK Setup.exe", it gives me the following error when
trying to refresh sources:

Failed to fetch URL,
reason: HTTPS SSL error. You might want to force download through HTTP
in the settings.

I do as it says and enable force http, but still get the same error.
Does this have to do with my http server/proxy settings? In the
settings tab, they are blank.

I'm running Windows 7. However I did try to run the installer under
administrator mode, and in compatability mode (which shouldn't be
necessary, Google supports vista).

Thanks a ton!

2. moving Views and View.getWidth(), getHeight(), etc..

I am working on an app that requires widgets to be repositioned at
runtime. The docs say getWidth() should return the width of View at
runtime but the only value  getWidth() returns is 0. Can someone point
me in the right direction on how to get the dimensions of a view at

3. No actions in intent filter at /data/app/ApiDemos.apk

4. Pretty code program (for all developers)...

5. Simulating accelerometer events natively?

6. Best way to launch Messaging app via intent

7. Plz post "Hello, DatePicker" code