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
0
votes
1 answer

database rawQuery EROR

11-20 11:20:37.147 4117-4117/com.example.ilhamsabar.cobadiet E/AndroidRuntime﹕ FATAL EXCEPTION: main Process: com.example.ilhamsabar.cobadiet, PID: 4117 android.database.sqlite.SQLiteException: no such table: dietocd (code 1): , while…
0
votes
1 answer

OrmLite inside an Android Module

I'm trying to put all the DatabaseRequests inside a module in Android to centralize all the acces to DDBB in the same place. I'm wondering if I'm making any mistake doing that. The apps works in the right way but I'm concerned about best practices…
MarcForn
  • 3,321
  • 7
  • 25
  • 39
0
votes
0 answers

How to get to know that image has been deleted from sdcard

I have an application which downloads the image and saves in the sdcard of the device and meanwhile it saves the name of downloaded image in the database along with their path (this path is a physical path on device) Why I am doing this? It has only…
Coas Mckey
  • 701
  • 1
  • 13
  • 39
0
votes
1 answer

Retrieving ID from SQLite, Android

I have problem with retrieving ID from table. In the project I have SQLite database which contains two tables: students and departments. Departments table is completed by me. I read data from this table by Spinner. how can I get the id of the…
pank_94
  • 13
  • 7
0
votes
2 answers

Android Studio error defining parameter for SQLiteOpenHelper from another class

I cant seem to get the right parameters when I create an new DatabaseHandler I have tried this every which way and it works fine when the code is in the main activity using DatabaseHandler db = new DatabaseHandler(this); I cant figure out what I…
Mikeysadleir
  • 17
  • 1
  • 6
0
votes
1 answer

android database not open - SQLITE

I am trying to create password manager app that the user can manage her password in any websites. The user need to fill 3 fields - Website, Username and Password. Behind the scenes, the data should be insert to the database in SQLite but I think…
Ramirez
  • 124
  • 1
  • 1
  • 6
0
votes
0 answers

I'm getting some error while trying to read some datas from database android

I have been following one tutorial for creating multiple tables in database, but I got some errors and didn't success in solving them. This is new for me, so take it easy if I have made some stupid mistake, but i'm trying here to learn. These are…
Dusan Dimitrijevic
  • 3,169
  • 6
  • 22
  • 46
0
votes
1 answer

Strategy for exporting Android SQLite Database with large number of photos to user-friendly output

I'm looking for some help on a strategy for exporting data from an android app I recently developed. I am a fairly competent coder, but I am not formally educated in this area, so I am hoping someone can give me guidance on what road to go down as a…
aterbo
  • 432
  • 7
  • 24
0
votes
1 answer

Why error NetworkOnMainThreadException is coming?

I am want to simplily a Android app connect to PHP Mysql, I am read many tutorial of PHP and Mysql to Connect Php with Android app but every one is running on emmulor, I have no real device, so I use emmulator for testing. why this error is coming…
Devan
  • 21
  • 7
0
votes
1 answer

How to prevent a thread running after Database is closed in service?

public class ValuatorService extends Service { SQLLiteAdapter db; Context context; String strLat, strLong, strTempLat, strTempLong; static String prospect_no; public Database database; long boolDistanceDetail; static…
Shivputra N
  • 688
  • 7
  • 17
0
votes
2 answers

How to insert the data into the database about 200 rows from the db file?

The database structure will be as follows: city_id city_name 1 Hyderabad 2 pune 5 mumbai...... I want to add the data to my app's database from the .db file which is in the assets folder of the project.
Amaresh Jana
  • 732
  • 11
  • 22
0
votes
0 answers

CursorIndexOutOfBoundsException Index 0 requested with a size of 0 Android Error

When it goes to my second activity, first it shows "Unfortunately stopped", then it does what I want to do, and the activity shows me truth. What kind of error is that? What should I do with that? In My First Activity: package com.example.mydic; …
Ali
  • 1
  • 5
0
votes
1 answer

Saving radio button state and repopulating the state

I have a custom ArrayAdapter which is populated by a layout containing a radio button with single choice mode. I managed to save the items added to the ListView and repopulate the ListView when the activity is destroyed but checked radio buttons…
0
votes
1 answer

Database in a swipe

I'm a beginner in Android development - and also sorry for my bad english, it's not my native language. (: Ok, so. I'm trying to implement an application that swipes between three tabs, and in one of them there's a database - it has to be shown…
apheniti
  • 66
  • 2
  • 10
0
votes
0 answers

Does the Android Cursor database function have an effect on data ordering

I have a programming hurdle that I would appreciate your assistance. I used a tutorial to create my database and I am having an issue as I do not properly understand the Cursor function and its application. I have a database that stores contacts and…
Biko
  • 332
  • 3
  • 15