Hello,

Can someone help me take a look at some of the code I've written and
tell me what is wrong with my use of managedQuery? My app crashes
whenever I manage to change from landscape to portrait as my adapter
is still loading data from a managed cursor, or by pressing the home
button or opening something else that pauses/stops my activity.

I have a background service that loads data into an SQLite database
that is accessible via a content provider as illustrated in the
documentation and in several of the same applications. I've found it
really hard to trace this down to any specific point in the
application other than it takes place shortly after postResume().

Here is the main activity that contains the list that uses the managed
cursor:
http://code.google.com/p/andtweet/source/browse/trunk/src/com/xorcode/andtweet/view/TweetList.java

Also, here is my detail view of a list item:
http://code.google.com/p/andtweet/source/browse/trunk/src/com/xorcode/andtweet/view/Tweet.java

And here is my service:
http://code.google.com/p/andtweet/source/browse/trunk/src/com/xorcode/andtweet/AndTweetProvider.java

I do not call cursor.close() anywhere as far as I can tell, so what
closes the cursor? And why is the ListView or whatever still trying to
read data from the cursor if it has been handled by the life cycle of
the activity and as such closed before the ListView is stopped/
destroyed?

I am at my wits end with these managed cursors. What am I doing wrong?

Thankful for any kind of light you guys can shed on this. Let me know
if you need stack traces or anything like that and I'll send them
over!

Warm Regards,
Torgny
--~--~---------~--~----~------------~-------~--~----~
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