The same code that worked in an Activity when put into a DialogFragment for 
accessing a new instance of a DBAdapter crashes if the database doesn't 
exist or has no entries.  It will work if there is at least one entry in the 
database and generates a NullPointerException.   My workaround  is since an 
activity calls the DialogFragment is to check the database before running 
the dialog.  No entries, don't run the dialog.  This is under 3.1 and 3.2 
(haven't run a 3.0 emulator with it).  Also occurred on my Acer a500.  

Anyone else find this?  Is this a known issue?  I couldn't find anything 
like this on the issues list.  There are similar problems reported on 
StackOverflow but not quite the same thing.  I want to test with just a 
Fragment to see if it happens and will then submit a bug report along with 
the stack info.  The DBAdapter code is very straightforward as with the 
examples in the SDK.

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

Reply via email to