[android-developers] Re: What is Context for?

2009-05-19 Thread Matt Williams
Thank you all for your advice. I had intended to utilize an abstract class for storable objects which would access the database through a singleton adapter. The database handler would only be initialized if there was a method call that would require usage of the database. What I will do instead

[android-developers] Re: What is Context for?

2009-05-18 Thread Marco Nelissen
On Mon, May 18, 2009 at 11:45 AM, Dianne Hackborn wrote: > On Mon, May 18, 2009 at 8:18 AM, Marco Nelissen wrote: >> >> ContentProvider is single threaded, so it'll automatically be >> synchronized, but you'd have the same issue with the various threads >> having to wait for access. > > Actually

[android-developers] Re: What is Context for?

2009-05-18 Thread Dianne Hackborn
On Mon, May 18, 2009 at 8:18 AM, Marco Nelissen wrote: > ContentProvider is single threaded, so it'll automatically be > synchronized, but you'd have the same issue with the various threads > having to wait for access. Actually ContentProvider is NOT single-threaded. -- Dianne Hackborn Androi

[android-developers] Re: What is Context for?

2009-05-18 Thread n5r11
You said "any advice" so here it comes.. Try looking at chapter 11 LaunchList example from Mark's Android Tutorials book source code: http://commonsware.com/AndTutorials/AndTutorials-0_9_5.zip I sure hope Mark is doing things "the write way" :) On 17 мај, 19:36, Makeable wrote: > I have just st

[android-developers] Re: What is Context for?

2009-05-18 Thread Marco Nelissen
On Mon, May 18, 2009 at 6:39 AM, Matt Williams wrote: > > The application context itself is not available to the DBAdapter > singleton. Why not? Can't you pass it in when you create it? > Am I simply taking the wrong approach in managing my applications > access to the database? > Would I be be

[android-developers] Re: What is Context for?

2009-05-18 Thread Matt Williams
The application context itself is not available to the DBAdapter singleton. Am I simply taking the wrong approach in managing my applications access to the database? Would I be better off with using a content provider, for example? Is this the preferred method? Obviously, by using a synchronized

[android-developers] Re: What is Context for?

2009-05-17 Thread Marco Nelissen
Your application/activity will be given a Context by the system. Use that. On Sun, May 17, 2009 at 10:36 AM, Makeable wrote: > > I have just started on a new application that will use SQLite for > persistance and Im a bit confused over the usage of a context when > utilizing the SQLiteOpenHelper