Hello all,

so I am trying to do the following. I want to download or better say
fill a local database from an XML file on the web. I have the
myXMLHandler class (got insight from the web for this) and I have
myDBHelper class (also learned from a tutorial on web).

The problem is that I want to do the loading of the database inside of
the myXMLHandler class where I don't have a database object/handle.
Also, when I look at myDBHelper class I realize that SQLiteDatabase
object is not a static so my first question is should I make it
static?

Second question is, should I somehow create a database in a singleton
class or in a class that extends Application so that I have one object
throughout my class and then adjust myDBHelper class so I can pass a
db object to it?

Since I combined several tutorials, and I guess all of them
concentrate on just one thing, I think I will make an App class where
my db object will be created and exist but I am unsure if this is a
good way to go or there is a better design for this.

Thanks for the help! If needed I can post my code but since there is a
lot of code I didn't want to paste it in just yet :)

Cheers,
D.

-- 
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