i have created class cl_DBHandlerwhich extends SQLiteOpenHelper. and i have created class my_srvcwhich extends service. i have intialise object m_DBHandlerof class cl_DBHandlerin service but while initialization object i have to pass parameters to cl_DBHandler(context, name, factory, version), i am not getting exactly what to pass in this.
i have pass like this cl_DBHandler(getappcontext(),"databasename.sqlite",null,1)
2nd thing: i am calling one function from class with help of m_DBHandler object but i am getting value null of object m_DBHandler at every call though i have intialise that object in service.can anyone tell me or guide me to solve this problem.
Thanks in Advance–
Use the following constructor for your cl_DBHandler class
In your service or activity:
Then open your database: