I traced it down to the following line
SQLiteDatabase myDb = ((myApp) getApplication()).getDb();
which gets a pointer to the open database in the application singleton.
This is technically outside of the activity, so maybe that is why the code
fails. But still, it's not entirely intuitive. The database is used by a
service as well, and I thought I should not have more than one pointer to
the same database, or?
On Friday, September 28, 2012 5:40:44 PM UTC-4, G. Blake Meike wrote:
>
> As RichardC says, it is going to be hard to figure this out without more
> information. The only change that I am aware of, controlled by that Dev
> Option setting, is that Activities are scheduled for destruction when they
> become invisible. What do you mean by "leave" the activity.
>
> The most typical cause of this problem is that the AsyncTask is not static
> and, therefore, has a pointer to the Activity in which it is declared.
>
> G. Blake Meike
> Marakana
>
> The second edition of Programming Android is now on-line:
> http://shop.oreilly.com/product/0636920023005.do
>
--
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