Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Looking for design/architectural advice on Geocoder and contacts provider

 
James Elsey
Ranch Hand
Posts: 228
Android IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.

I'm looking for some advice on how I should be tackling a few issues. I've already got some solutions in my application, but I'm striving for quality and feel some of you on here might have some good pointers.


My app uses the Geocoder library to obtain lon/lat co-ordinates from postcodes. Currently when I start a particular activity, the geocoder loops through my contacts and obtains relevant information that I require. The constraints of this are firstly that an internet connection is required, and secondly, each call to this service can be potentially slow. At the moment I have about 10 contacts, and when I hit this activity there is about a 15 second pause while all this infomation is gathered, less than ideal.

I'm thinking of having a service which can make all the calls, and store the results in SQL lite. This would be good because once I've got a lon/lat for an adress its unlikely to change so might aswel cache that locally.

How should I deal with the addition of extra locations? I'll need to make the geocoder call again, should I have some kind of refresh button, that when clicked, checks for any new contacts which don't have any cached data and then do the call? I'm a bit unsure on how I should tackle this issue.

Would be really grateful of any advice on how I should tackle this, I'm not asking for a free lunch here, just need a few pointers. I'm planning on writing the outcome up on my blog so for anyone that can advise me I'll give you a good plug there!

Cheers
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic