Today I rewrote the Address Book listener portion of my code to hopefully make it work more smoothly and to fix a few bugs with it. Basically, in TB 3 so far, an Address Book Listener is called when an event occurs in the Address Book. It can handle onItemAdded, onItemRemoved, and/or onItemChanged events and specify what to do in each circumstance.
My previous implementation didn’t work well if multiple items were added or removed by the user simultaneously but now it should work just fine. I had some timing issues with all the HTTP requests, so I added a command parameter to most of the methods that send them. The parameter is an array of strings that contain commands. When the HTTP request gets a 201 response it then evaluates each command in the array. Right now the onItemChanged is still rough and requires another request be sent after the first, so I had to send commands to make another command array into the first request. That will hopefully be changed soon.
Then, I decided to finally add a preference to my pref dialog for changing the Address Book name. It should work with the Personal Address Book, but for now the default will be Google Contacts.
After that was done, I realized that my current initialization/sync process was more complicated than it should be, so I re-wrote that. It will still require another re-write, but this method is better. I might expand on this idea soon.
Time to go to bed and hopefully fall asleep within a few hours… If you made it this far without falling asleep you probably have the same problem falling asleep that I have.
<!ENTITY goodNight.label “Good Night” >
No comments yet.
| Next »