How to initialize sqlite database once from a helper class in Android

前端 未结 2 858
半阙折子戏
半阙折子戏 2020-12-04 00:24

I have a custom DataBaseHelper class which extends SQLiteOpenHelper,which looks like this :

package com.stampii.stampii.comm.rpc;


import java.io.File;
impo         


        
2条回答
  •  心在旅途
    2020-12-04 01:08

    I think for initializing your Database you have to pass the context of the activity in which you are using it, so for used it in every activity you have to initialize in every activity. If I m wrong please let me know.

提交回复
热议问题