• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Why is my activity starting?

 
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm having trouble understanding the inner machinations of some code I inherited.

The first time you run our app after install, a signup/signon activity runs, so you can create an account or provide credentials for an existing account. What I can't figure out is why it's running. I can see various places in the code where it's referenced, and that would kick it off, but I've got log statements and breakpoints at every one of them, and nothing is popping.

For instance, this activity is used by our Authenticator implementation, and our Application class does trigger it in response to certain Messages, but again, it doesn't look like any of that code is being executed by the time the activity appears.

The manifest just has:


Any ideas where else I might look, or what else might kick off an activity?
 
Jeff Verdegan
Bartender
Posts: 6109
6
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Interesting.

I managed to get hold of the original developer, and he told me something I wasn't aware of.

The activity is used by our Authenticator, which I knew, and I figured it had to be the auth operation that was kicking it off, but I couldn't find any evidence of that. The authentication task to add a new account takes place in a separate process, which I didn't know, and which is why I wasn't seeing any evidence of the Authenticator coming into play. My breakpoints only applied to our main process, obviously, but I was also looking only at our app's log, not the device log (which was a blind spot on my part, even if I had no reason to suspect a separate process).

Live and learn!
 
Today's lesson is that you can't wear a jetpack AND a cape. I should have read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic