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 6772951
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:36:33+00:00 2026-05-26T15:36:33+00:00

I have a pre-baked sqlite database that I want to use in my Android

  • 0

I have a pre-baked sqlite database that I want to use in my Android application.

I’ve followed this tutorial:
http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/

However nothing is throwing an exception during the process of building and copying the db,
but when I access the db tables, they are not there, like they don’t exist.

I made this sql query:

database.rawQuery("SELECT * FROM sqlite_master", null).getCount();

and I got the answer: 1. (I have 5 tables)

Any help?

  • 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-26T15:36:34+00:00Added an answer on May 26, 2026 at 3:36 pm

    That tutorial there is too old. Try the following steps:

    1) Create a class that extends SQLiteOpenHelper and overwrite the onCreate() and onUpgrade() methods

    2) In some Activity instantiate your class, created in 1) and that’s it – you will have your database created under data/data/YOUR_PACKAGE/databases/

    3) If you want after that, you may obtain writable instance from the class created in 1) (getWritableDatabase()) and execute insert statements towards your database to populate it with data. Wrap your data in ContentValues and use insertOrThrow(your_table_name, null, your_content_values).

    Hope that helps.

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

Sidebar

Related Questions

I have a pre-existing user database on my site. Now, I want to install
I have a pre tag within my page that contains quite a bit of
I have a project that comprises pre-build Dll modules, built some time in the
I have a form that I pre-populate with test data though jQuery. $('INPUT[name=subscription.FirstName]').val('Jef'); but
I have a web application written in pure JavaScript (no pre-generated HTML except for
I have to create a site definition for a client that must contain pre-defined
I have a Core Data-based iPhone app with a pre-populated read-only database. What protection
I have a form for a nested resource (Client :has_many Workouts) that I want
I have this issue with Core Data. I am creating a core-data-based application, for
I have a Visual Studio C++ based program that uses pre-compiled headers ( stdafx.h

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.