The Context
you passed to SQLiteOpenHelper
constructor was null.
Assuming ContactsManager
is your helper class, in here
db = new ContactsManager(getActivity());
you're instantiating the helper before your fragment is attached to an activity and getActivity()
returns null. Use some other source of Context
such as passing YourActivity.this
as an argument.