1. Bhavin Thakar's Avatar
    I have created a Database class file to use SQLite db in Android app. Since I am beginner and I am having problem understanding what should i put in context when I instantiate Database class to another class The database code is as follows:

    public Database(@Nullable Context context) {
    super(context,DATABASE_NAME,null,DATABASE_VERSION);
    database=getWritableDatabase();
    How can I instantiate it to an another class. When doing instantiation Database db = new Database(); what should be put under context
    Database db =new Database(Combiner.this);. I tried this but its showing Database(android.content,Context) in Database cannot be applied to (com.example.data.Combiner)
    10-14-2019 11:08 PM
  2. mustang7757's Avatar
    Hi, welcome to Android Forums

    I'd like to recommend creating a account so me or other members can assist you, as guest have limitations in replying here and if we need further Information to communicate with you.

    I'll provide a link to register, please come back to your post so we can further assist
    https://forums.androidcentral.com/sh...d.php?t=409154
    Laura Knotek likes this.
    10-14-2019 11:14 PM
  3. mustang7757's Avatar
    Once you register can put you in the developer thread .
    10-14-2019 11:15 PM
  4. B. Diddy's Avatar
    I went ahead and moved this to the Software Development forum for more specific traffic.
    Laura Knotek and mustang7757 like this.
    10-14-2019 11:16 PM
  5. Bhavin Thakar's Avatar
    Hi, welcome to Android Forums

    I'd like to recommend creating a account so me or other members can assist you, as guest have limitations in replying here and if we need further Information to communicate with you.

    I'll provide a link to register, please come back to your post so we can further assist
    https://forums.androidcentral.com/sh...d.php?t=409154
    I have registered so how can i create the same thread and get assistance
    10-15-2019 12:19 AM
  6. Rukbat's Avatar
    There's no need to do that.
    10-15-2019 12:04 PM

Similar Threads

  1. Replies: 19
    Last Post: 10-18-2019, 06:13 PM
  2. iOS to Android and Android to iOS
    By SaARm306 in forum Ask a Question
    Replies: 7
    Last Post: 10-16-2019, 02:48 PM
  3. Replies: 2
    Last Post: 10-14-2019, 07:26 PM
  4. Replies: 1
    Last Post: 10-14-2019, 06:58 PM
  5. how to back up all android phone data
    By Android Central Question in forum Ask a Question
    Replies: 3
    Last Post: 10-14-2019, 05:40 PM
LINK TO POST COPIED TO CLIPBOARD