Barnett Trzcinski September 13, 2010
Overview Stores a To-Do List Task, Due Date, Completed Persistent on Server Google App Engine
Server Google App Engine Datastore used to store data GET (with uid parameter) gets list contents POST (with action and data) changes list contents
Android First launch initializes the checklist from the server UID of the list can be set in the Options menu List is fully interactive and automatically synchronized Each HTTP task is queued as needed
GUI List Arrangement ListView uses adapters to display content In this case, a custom adapter was created with each row containing a LinearLayout The LinearLayout contains a CheckBox and TextView The adapter’s backing is a new class ChecklistItem
Strange Context Menu “Hack” CheckBoxes in the ListView absorb mouse events How to get around this: Register the context menu on the ListView normally Set OnContextMenuCreate for each of the ListView’s rows with an empty handler This enables events to filter down without redefining/adding to the parent context menu
Adding and Editing Tasks
Removing a Task and Changing Lists
Server Code Very simple – 93 lines including boilerplate comments Uses the App Engine Python API Google Datastore for storage Free-form database format – no schema needed in advance of object creation Maximum of 1GB of data to store (unless you pay) More than enough quota constraints for this app and audience
Key Features All data is persistent because it is stored at App Engine User does not have to synchronize Tradeoff: User does not need an account… So user doesn’t have any data protection, either Complete use of POST for data modification and safe GETs enhances security of the service (can’t send in unsafe parameters over GET) Full use of asynchronous background tasks for HTTP requests to avoid GUI locking