This is a question about Application design rather than how-to-do specific actions.
I am a student taking a beginner's course in Android Development. I am designing a program which initially requires the person to login, then at a later time they may choose to display a record of all the users that have logged in previous sessions.
As of right now, there are two parts of my app: LoginField Activity which takes the login data from the EditText field, and which is then supposed to write that information to an external .dat file of some kind so that the information will persist across launches, and a LoginHistory Activity which is supposed to display this history in a ListView.
I have toyed with creating a separate class for the ArrayAdapter logic - an ArrayAdapterController class (?) - but was uncertain how to pass information back and forth between it and the two Activities.
so - my questions are these:
apologies for the general nature of this question - as you can see I am an MVC novice.
You've asked a general question, so the best I can do is give you a general answer. You want to use the AbstractAccountAuthenticator class. The documentation there should give you a good jumping off point for you. Furthermore, the SampleSyncAdapter provides a comprehensive (but complex) example of using the authenticator with a full on REST Web Service.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With