Which activity is launched on debug?

Sysprogs forums Forums VisualGDB Which activity is launched on debug?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #388
    aqualung99
    Participant

    I kept getting a permission denied error trying to debug my native activity, and it turned out it was because Visual GDB was trying to launch my native activity as the startup activity. Where my AndroidManifest.xml file clearly shows that it’s my Java-based activity that handles MAIN and LAUNCHER. So attempts to start the native activity directly fail (not on emulators it seems though hehe….)
    I could not find any kind of UI for setting the startup activity. Might be nice to have. In the meantime, I worked-around the issue by making sure that my Java-based activity was listed first in my AndroidManifest.xml file (my native activity was listed first previously.) This caused Visual GDB to launch that one instead, and I’m back in business.

    #2009
    support
    Keymaster

    Hi,

    VisualGDB indeed launches the first activity from the XML file. Thus you can control it by editing the XML file directly.
    If it’s a major inconvenience and you believe making special GUI for it can save time, let us know so that we schedule this feature for further releases.

    #2010
    aqualung99
    Participant

    It’s not really inconvenient. It’s more a matter that the default behavior is “wrong” — i.e. launching my program with the debugger is not (necessarily) going to do the same thing as launching my program directly (because the same activity may not get launched.)
    So, I’m inclined to say, the default behavior should be changed such that instead of launching the first activity found in the list, the front end should determine which activity to launch by examining the AndroidManifest.xml file.
    However, that said, I can perhaps see some benefit in being able to direct the debugger to launch a specific activity, rather than the default startup one. In that case, being able to direct the debugger (in any way — UI, editing a file, whatever) is desirable.
    You guys have a quality product, I’ll leave it to you what you think you should do. But I do think the current behavior needs at least a warning or something if the debugger decides to launch a different activity than the one bound to the LAUNCHER and MAIN commands. I don’t think the average user will expect that behavior.

    #2011
    support
    Keymaster

    OK, you’ve convinced me that the current behavior is confusing enough. We’ll add support for reading the intent tags into the upcoming v2.8 release.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.