Questions tagged [android-database]

General programmatic usage of databases on Android

Databases and tools related with persistence supported by the Android operating system.

584 questions
-1
votes
1 answer

Why Database Gets Created Every Time I Restart My Application?

I have a database that gets created when application starts. It is intended to download a file and create the database from the file. The problem is that it downloads the file and create the database every time I reopen the app. The MainActivity…
miatech
  • 2,150
  • 8
  • 41
  • 78
-1
votes
1 answer

Saving png image in database through android app

I want to save image using my developed app into mobile what is the best way to it. I was trying to save via sqlite but is there any other options?
-1
votes
2 answers

Can you send notification between Android Emulator device and USB connected real device in Android Studio for demonstration purpose with database?

I want to make an app that has two accounts and mutual database. I want to send notification from the first to the second account in real time. Is this possible?
M.P.
  • 21
  • 1
  • 5
-1
votes
2 answers

How can I pull data from realtime firebase database into an array? I wish to change static data in an array to firebase data

I have created a custom calendar which uses an array "HomeCollection" taken from github link https://github.com/DeveloperBrothers/Custom-Calendar-View in order to create a custom calendar in my android application. Currently the Events data is…
-1
votes
2 answers

How to fix 'SQLite No Column Exception'?

I am developing an android application that saves logged in user information in SQLite. But I am facing strange problem. In my DBHelper class create table function is created fine, insert function doesn't throw any exception but when I try to…
-1
votes
2 answers

Can you set a column equal to another column in a table using SQLiteDatabse update()?

I need to make a column equal to another column in the table. I can't figure it out using the update method of my SQLiteDatabase. I know the SQL statement is: UPDATE coolTable SET columnA = columnB; Do I put it in the ContentValues I pass the…
-1
votes
2 answers

NullPointerException when insertData() called in android

I am currently working on android stenography project, but at registration time the error was occur "java.lang.NullPointerException: Attempt to invoke virtual method 'boolean…
-1
votes
1 answer

Display each row from Database on a new line in a TextView

I have created a database that stores all the correct values. I need for each row stored in the database to be displayed on a new line in one TextView. Current Output Current Output After adding to database it adds on and updates current values…
-1
votes
2 answers

Why is getWritableDatabase() necessary to create a SQLite database?

I want to create a SQLite database. So I followed a tutorial and I have these two lines in my MainActivity that create the database. LugaresDB lugaresDB = new LugaresDB(getApplicationContext()); SQLiteDatabase db =…
-1
votes
1 answer

Where is best place to save frequently changing data

Think of an activity that contains a toggle button and user can frequently change its state and I have to save that state in database . It does not seem rational to save it on every click ! so I decided to save such changes in onStop() of my…
user3422607
-1
votes
1 answer

list view not working properly in android

List view is not showing anything when i dont add any delay in code but when i add delay for about 1 second ,the results of list view gets displayed on screen.Its working in android version 5.1 in this way but when i run code in android 7.1 nougat…
-1
votes
3 answers

I am using String arrays directly from the values instead of using database for my app. Does this make my app slower?

I am working on a simple app that displays certain categories of string and i am using String array for this instead of using database. Is this a bad practice?
-1
votes
2 answers

How to link app to external SQlite database file

I'm on the final hurdle of my app, and been stuck on trying to connect the app to an external SQLite database file that i have already created called "health1.db". I want my app to read data from that file. I have already written some code but that…
Ajeeli
  • 325
  • 1
  • 3
  • 16
-1
votes
2 answers

Android SQLite DatabaseHelper unknown error (code 14): Could not open database

I'm trying to use this DBManager as SQLite database helper. The problem is that it does creates the database but first throws this error. I'm not getting how to create the database without facing this error. Note : There are similar questions but…
Leap Hawk
  • 622
  • 1
  • 6
  • 25
-1
votes
1 answer

why where clause query is not working in the sqlite database in android?

I added a column named id in the database "quest" by using the OnUpgrade() method.But when i run the app there is no data in the arrayList. I used Log for checking the cursor and ArrayList size,Both are zero. When i ran the app first Time it gives…