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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T02:05:40+00:00 2026-06-01T02:05:40+00:00

I have made this code to open a database(created in SQLite browser) stored in

  • 0

I have made this code to open a database(created in SQLite browser) stored in assets folder in my app:

public class DatabasetryActivity extends ListActivity {
/** Called when the activity is first created. */
private ArrayList<String> queryString;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
DatabaseHelper myDbHelper = new DatabaseHelper(this);
myDbHelper = new DatabaseHelper(this);
queryString = myDbHelper.getData(new String[] {"Area","disease"}, null, null, null,
"Area"," ASC");
try {

myDbHelper.createDataBase();

} catch (IOException ioe) {

throw new Error("Unable to create database");

}

try {

myDbHelper.openDataBase();

}catch(SQLException sqle){

throw sqle;

}
setListAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1
queryString));   
getListView().setTextFilterEnabled(true);
}

where DatabaseHelper is another class in same package but while running this android project on emulator the following message appears on console tab:

ActivityManager: Warning: Activity not started, its current task has been brought to
the front

and nothing appears on the emulator. please help me out. Thanks
Guys please help me out as this is my first post here..and i am new to android

  • 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-06-01T02:05:42+00:00Added an answer on June 1, 2026 at 2:05 am

    What you want to use to create your data base is actually an SQLiteOpenHelper. You can find the documentation for it here. You can also find various questions about it on StackOverflow. You can then use a list adapter to add database items to a list. This should simplify your code and make the SDK work for you. You can Google this and there will be many example.

    Also a tip for future posts. You can add spaced to the code in your questions/answers so the indentations are correct and make it easier to read. StackOverflow is a great community and will help you learn quickly as a developer. Welcome and get involved!

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

Sidebar

Related Questions

I have made this script to open a fancybox from code behind, but it
I have a problem, and I made this test code to show you my
I have roughly the following code. Could this be made nicer or more efficient?
I have developed a program (C#) which creates a SQL database using this code:
I have bug checked this code considerably now and made sure I am outputting
I have made a generic function to show jQuery dialogs in my app. this
Hi have made this function which is made to replicate an error that I
I have made this centered navigation bar, and I wanted to add a :active
I have made this webpage, you can check it out here http://www.bettingtowin.net/webcam.html I have
OK, I was just fooling around in my spare time and have made this

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.