Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7568117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:50:34+00:00 2026-05-30T14:50:34+00:00

I tried to use SQLite on Android. I want to see my database file.

  • 0

I tried to use SQLite on Android. I want to see my database file. So, I use Android File Explorer and browse this link:
Data\data\App_name But in Data\data. I cannot see my app name. (in below code will be: com/app/TimeTracker)

Here my code to test:

first is my main program:

package com.app;
    public class TimeTrackerActivity extends Activity {    
        @Override
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.main);
            TimeTrackerDatabase database = new TimeTrackerDatabase(this);
        }
    }

and second is my database helper:

package com.app;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class TimeTrackerDatabase extends SQLiteOpenHelper {

    public TimeTrackerDatabase(Context context){
        super(context, "timetracker.db", null, 1);
    }

    @Override
    public void onCreate(SQLiteDatabase database) {
        database.execSQL(
                "CREATE TABLE timerecords"+"id INTEGER PRIMARY KEY, time TEXT, notes TEXT)"
        );
        
    }

    @Override
    public void onUpgrade(SQLiteDatabase database, int oldVersion, int newVersion) {
    }

}

Is there any problem in above two file ? If has, please tell me what. And if not, please tell me how to fix this problem.

thanks 🙂

@Edit: I add my screenshot of my data folder. (No file in lib folder)

Screenshot

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T14:50:35+00:00Added an answer on May 30, 2026 at 2:50 pm

    the database related issue will be solved by below updation in your code.

    package com.app;
        public class TimeTrackerActivity extends Activity {    
            @Override
            public void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.main);
                TimeTrackerDatabase database = new TimeTrackerDatabase(this);
    SQLiteDatabase db = database.getWritableDatabase();   //Add this line.
            }
        }
    
    public class TimeTrackerDatabase extends SQLiteOpenHelper {
    
        public TimeTrackerDatabase(Context context){
            super(context, "timetracker.db", null, 2);
    
        }
    
    
    @Override
        public void onCreate(SQLiteDatabase database) {
    
         database.execSQL(
    
                    "CREATE TABLE timerecords" +
                    "(id INTEGER PRIMARY KEY, time TEXT, notes TEXT)"
    
            );
    
        }
    

    Regarding your app not visible in File explorer, you need to search by package name as below
    data/data/com.app and here you can see database folder where you can see all your databases created by applicatioenter image description heren

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I tried to use this on my class library mylib.core.data.dll and got a successful
I tried to use an image file in my HTML template. But when I
After doing my exercise in school, I use Sqlite to store my data. But
I'm having some trouble searching a SQLite database in my Android app. I use
I'm trying to store dollar amounts in the sqlite database provided by android but
I'm developing an application for Android, and have tried to use ORMLite, but the
I have an SQLite database in Android and I use a ContentProvider to handle
I want to use SQLite as a database for my C++ project. I also
I tried to use DriveInfo.IsReady, but it returns false if an unformatted floppy is
I tried to use object expression to extend the IDelegateEvent, but in fsi there

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.