Sunday 15 January 2012

android - Can't find login Activity -


I had an "on / off" session with Android for the last three years, which can be placed with an app It has been described as.

To avoid such a tropism, I decided to use it as a guide for expansion and as a guide for good working conferences.

I think I have the logic behind the basic dagger (which is used to inje the entire module and class in the app), but it may look like a fool, I do not understand How to say login activity or when:

  • "Home" activity (which is specified with the launcher / home intent filter) is called carriole activity, and it's used to login After receiving Has all the ingredients are used to show (users, news and Chekins pieces). There is no reference to the login activity.
  • The login activity is called bootstrap etincticator activity
  • Its only reference is in the bootstrap module class, where it's the member of "injection" @module annotation.
  • In addition, there is a secret bid from the AndroidManifest.xml file:

          

    This is not useful ...

    OK, so there is no direct callback, no intent filter, and my IDE The "Find Us" button does not help either (class only shows the use of class ...)

    This gives me two possible explanations: 1. Do something with injection That which fails to understand me is
    2. I have completely wiped out.

    After tampering with virtually every single square in the project, and some spent on traceview And hours, I found on the Android bootstrap Google Group.

    Bootstrap uses Android's built-in authentication framework, which means that there is a service defined in the app here that checks whether the API key or login details are saved, and if this login activity Does not start.

    To do this, here is a good list that partly describes the authentication lifecycle:

    1. Login activity is called the BootStrapAccountAuthenticator class addAccount method (which Class extends)

    2.The BootStrapAccountAuthenticator is added to AccountAuthenticatorSerivce, which gives the authenticator at (); (There is an intent filter for android.accounts.AccountAuthenticator in the service.)

    4. Another class, which is called ApachePriver, account manager .getAuthTokenByFeatures ( ), Which in turn binds to the AccountAuthenticator service) and gets the key back.

    5.bootstrapServiceProvider returns its getService (); The method is a new bootstrap service that is created with the key retrieved by ApiKeyProvider (the bootstrap service is the use of HTTP requests to implement a Pauszo kensawiski http- request library).

    6. BootstrapServiceProvider.getService () calls each piece square (in this case the total of three);

    Regarding the use of a dagger, all things are injected in advance from their own pieces, and include account manners. I think it may allow relatively modular codes (for example, you can swap ApacheProver with one by one).

    I hope that this is also far from clear, and probably possibly for anyone's help. / P>

    I can come back later and answer "Refactor" ...

No comments:

Post a Comment