solution is to registerDataSetObserver and look for invalidated and changed states on cursor
Once the acitivity goes to background cursor will be get deactivated and you can catch it in OnInvalidated On Tue, May 18, 2010 at 2:02 PM, social hub <[email protected]> wrote: > *android.database.StaleDataException: Access closed cursor* > > > I have activity A and I used managedQuery in Activity A. I have an adpater > which extends from BaseAdapter. In GetView I access the mcursor to get > fields. > > > If I click a button on Activity A it goes to B, A---> B > > The problem arises when I am in activity B *and it's visible(B), the error > is thrown from Acitivity A. * > > I dont understand why I get the error from Activity A. Activity B is > visible now and A is in background. > > There was a post already on this group with similar error but there was no > response. > > I was hoping if someone encountered this and found a solution. > > Thanks in advance for your response. > > > > > > > > -- 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

