From: Bender <abende...@googlemail.com>
Date: Thu, 5 Aug 2010 13:48:56 -0700 (PDT)
Local: Thurs, Aug 5 2010 4:48 pm
Subject: Re: Database handling - when do you open and close
Thanks for your reply, and sorry for my late answer. :-)
I tried to get it running as a service but I don't really get how I
I created one class for the service, which holds the variable for my
public class DatabaseService extends Service {
public DbAdapter mDbAdapter;
@Override
@Override
@Override
}
This is my database binder:
__________________ public class DatabaseBinder extends Binder {
public DatabaseService mDatabaseService;
public DbAdapter getDbAdapter() {
}
And this my service connection:
__________________ public class DbServiceConnection implements ServiceConnection {
DatabaseBinder mBinder;
public DbServiceConnection(DatabaseBinder binder) {
@Override
@Override
}
If I want to use this in my activity with this:
private DatabaseBinder mDatabaseBinder;
final Intent databaseServiceIntent = new Intent(this,
mDb = mDatabaseBinder.getDbAdapter();
I'm getting a nullpointer exception at the last line. I don't know if
On 19 Jul., 00:30, brucko <geoff.bruck...@gmail.com> wrote:
> Bender,
> put your db in a local Service. Open the db in onCreate() close it in
> Take a look at :
> http://developer.android.com/resources/samples/ApiDemos/src/com/examp...
> but DONT have your binder as a non-static inner class as in the
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||