Dear experts,

As hinted earlier, I've hacked up a little service called "Zap's Hitta" 
(available for free on the Market) which basically takes the incoming 
phone number and pulls various info from public phone catalogs (only 2 
implemented so far) to both show more details about who calls you in a 
Toast and also update your Contacts with more data.

It works pretty well IMHO, though it could do with some visual polishing.

However, it appears that what I do will somehow also potentially stress 
the sync process (specifically Android.process.acore) to die. Here is a 
summary of what I experience:

* As long as I just use the system "passively" - that is: stuff is only 
added to Contacts when calls arrive - everything is hunky dory.

* Using a (crude) ExpandableListActivity to show existing phone numbers 
(standard stuff I found in an example here) works seemingly perfectly. I 
have 1000+ Contacts that scroll by perfectly fast and expand as needed, 
seemingly without eating memory (I see no calls to onLowMemory nor do I 
run out of file descriptors.)

* Trigging a few of the numbers in the list to fetch data also works 
just fine (I can't see any file descriptor leaks or significant memory 
allocation).

* However, if go somewhat wild and start pulling down names+addresses 
for a lot of the numbers in my phonebook (note: just one by one in 
sequence) I will set off the sync process (acore) too and this is where 
the trouble starts:

My ExpandableListActivity obviously runs a top level query over 
People.CONTENT_URI with a SimpleCursorTreeAdapter for each person's 
phone numbers (standard stuff from this list/example).

When the sync process starts, my Activity will slow down significantly 
and if I keep going it will seem to freeze for a few seconds now and 
then (presumably when acore is busy), after a while I start to get those 
classic annoying warnings (the log file warns about this much earlier). 
Still, between hangs things keep working.

However, if I keep going, I can see in LogCat various activities being 
restarted and in the end my app will be killed too - according to the 
log the reason is that acore has been killed and my app relies on it and 
hence must be killed too (that's not the exact wording, but I can get it 
if you need).

My main question is of course: Is this a bug/limitation or just me being 
stupid/naive about how to implement this? Sure, I may add an 
Organization and a Postal address every 5-10 secs or so, but that's not 
particularly extreme IMHO, is it?

A side question (hinted in an earlier thread, but I got no response - 
bumpiety-bump ;-)) is whether there is any possibility to skip my 
ExpandableListActivity completely and instead "teach" the standard 
Contacts app to optionally call my service from the ContextMenu that 
currently includes "Make default number". (I know going the other way of 
my calling this activity isn't possible.)

BTW: This acore issue is very different from the one I reported in bug# 
2377 - the data here is perfectly legitimate as far as I can tell and 
will sync fine if I leave the phone alone.

All advice appreciated - keep the good stuff coming...

                Best / Jonas

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to