Tuesday, March 13, 2012

This week's future work

Writing the goals for a week and then checking the result is a great way to monitor the progress of what I do. This is exactly what I am going to do, so that efficiency is maximum. What I want to accomplish this week is:

Finish the client application design. I currently have an application which displays the google accounts that the user has in his phone, and when one of them is clicked, an activity creates two tabs.

The first tab is selected by default, and here it should appear the user's database from the cloud. Currently this is not happening. When the second tab is selected, the user should be able to add a Task to his database (and the server database should be updated). This also is not yet available.
  • When the first tab is selected, the application displays the user's database from the cloud. 
    • Find a way to return to the main Activity the authenticated HttpClient (so I can use it then with GET, POST or any method that the user tries to make).
    • When setListAdapter is called, the result should be displayed in the first tab activity in a pleasant way.
  • Make the graphic design for the second tab
    • Add 3 EditTexts and a button to add the Task.
    • The user should be able to select the date in a familiar way, something like Date Picker
    • When the button is clicked, the server database should be updated and the server database should also contain the new added Task.
My biggest problem last week was Authentication. A client can only call the GET method if he is authenticated (my colleague did the authentication with google accounts for the server). I tried different methods to authenticate, not knowing the best one. I also had troubles finding the best approach:
  • At the beginning I tried to authenticate in a different activity, but I realized this is not appropriate for what I am trying to do ( I don't need a new Activity, as the work should be done in background, without interacting with the user )
  • Next, I tried using a Service, but as I found out, a Service should be used if the background job is  some CPU intensive time consuming job.
  • What I am trying now is with AsyncTask. I am having problems sending results from the new thread to the UI thread, though. 
This issue is first on my To Do list, I will let you know my results. 

No comments:

Post a Comment