On Thursday, April 4, 2013 1:53:15 PM UTC-4, plnelson wrote:
>
>   ( *this is a followup to an earlier thread.  I've directed all new 
> comments there to here* )
>
> I'm trying to launch an Activity with *standard* launchMode; it launches 
> *perfectly 
> fine* when its launchMode is set to *singleInstance*. When I set it to *
> standard* nothing happens; it never gets to onCreate or onStart or 
> onResume, or the constructor or anyplace in the target Activity - I've 
> instrumented all the lifycycle events and set breakpoints.
>
> In the LogCat it shows . . . 
>
> 03-29 19:23:56.454: I/ActivityManager(119): Starting: Intent { 
> flg=0x4000000 cmp=com.xxxx.remote/.DGraphActivity (has extras) } from pid 
> 13727
>
> … and that's all it has for DGraphActivity. What's interesting is my 
> program has lots of Activities and in all the other ones the "Starting: 
> Intent" was followed immediately by a "trying to launch..." the Activity in 
> question. But DGraphActivity had no "trying to launch" or anything else. 
> (how can I figure out why it stalls?)
>
>  My launch code looks like this . . . 
>
> if (DGraphActivity.bitmap != null) {    Intent intent = new Intent(ctx, 
> DGraphActivity.class);    intent.putExtra("Buttons", sButtonParam);    try {  
>       ctx.startActivity(intent);    }    catch (Exception e)  {        
> Log.e("Commands", "failed to start DGraphActivity", e);       }}
>  
>
> in the manifest . . . 
>
> <activity android:name="DGraphActivity"    
> android:screenOrientation="portrait"    
> android:launchMode="standard"></activity>
>
> But now I've made a* truly* *bizarre discovery*. If I try to launch it 
> TWICE, it works! I first noticed this just pressing the launch button twice 
> on my app, but it even works if I put the two calls next to each other in 
> the code!
>
> *try* {
>
> ctx.startActivity(intent);
>
> ctx.startActivity(intent); //!! investigating a weird bug
>
> }
>
>
>
>  The Logcat looks like this . . . 
>
> 04-04 13:20:05.291: I/ActivityManager(119): Starting: Intent { 
> flg=0x4000000 cmp=com.xxxx.remote/.DGraphActivity (has extras) } from pid 
> 27067
>
> 04-04 13:20:05.291: I/ActivityManager(119): Starting: Intent { 
> flg=0x4000000 cmp=com.xxxx.remote/.DGraphActivity (has extras) } from pid 
> 27067
>
> 04-04 13:20:05.295: D/PlyListActivity(27067): paused
>
> 04-04 13:20:05.299: W/ActivityManager(119): Trying to launch 
> com.xxxx.remote/.DGraphActivity
>
> 04-04 13:20:05.302: D/PowerManagerService(119): enableUserActivity true
>
> 04-04 13:20:05.302: D/StatusBarManagerService(119): manageDisableList 
> what=0x0 pkg=android
>
> 04-04 13:20:05.306: D/DGraphActivity(27067): constructor
>
> 04-04 13:20:05.306: D/DGraphActivity(27067): created
>
> This is one of the weirdest things I've ever seen in my career as a 
> software engineer! Does anyone have any idea how to debug what's going 
> wrong here?  Thanks in advance!
>
>
>
> 

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to