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
2 answers

Adding current time to SQLite database in Android Studio

I have made a database todo list application and would like to add the current time to it. However, I do not know how to do this in Java. public void addProduct(ListItem product) { ContentValues values = new ContentValues(); …
-1
votes
1 answer

How to provide security for local data in an android application?

I'm creating a basic android application using the Dropbox API. I am using the generated token of my account only in order to fetch some data from the dropbox account. Once I deploy the application I want everyone to see the contents my dropbox…
-1
votes
1 answer

Constantly retrieve data from database in a infinite loop

I created a database with a table named flagTable, this table only has two fields, which are id(auto increment) and an integer field. Next, in my program, I have a button that will trigger a thread to start. When the thread is starting, it…
-1
votes
1 answer

NullPointerException Android

I am getting NullPointerException and I couldn't fix it. Could anyone please have a look at my code to see what the problem is and how to fix it. Thanks in advance. DatabeseDEO.class public class DatabaseDEO { private DatabaseHelper…
-1
votes
1 answer

get array of database info android?

this is my code for getting data from database,but any things not show.what's wrong about it public String[] GetData() { String[] result =new String[]{}; int counter=0; String[] Columns = new String[]{KEY_ID, KEY_NAME, KEY_PHONE,…
amardco
  • 17
  • 1
  • 6
-1
votes
1 answer

How to use the expandable ListView with database data

I have been trying to use expandable listview to be populated with data from a database, i can display this data in a simple listview (each row for each item on the listview). However in my app i want to give the option to the user to create…
-1
votes
1 answer

Retrieve "_ID" value from listview on item click

Im using a adapter to populate a listview, and im using the method "GetItemId" to get the _ID from database of the clicked item. However, the value is not getting to the details activity (shows details of the clicked item on listview),i searched…
-1
votes
1 answer

Stop .setText from overwriting ? From database cursor result

I am using a method with a cursor to return all values that has the same id, like for example: ID_Owner | ID_Car 1 -------- 1 1 -------- 2 The owner with the id, has the car 1 and 2.. With my method im returning those values: // Seleciona o…
-1
votes
1 answer

How to get foreign DatabaseField automatically with query?

I'm using ORMLite (v4.48) with my Android app. I have the table "Contact" which can contain multiple "Email" (ForeignCollectionField) and one "Personal" (DatabaseField) object. When I get the Contact object from the database I would like to…
Dominik
  • 1,703
  • 6
  • 26
  • 46
-1
votes
2 answers

how to parse soapobject response from asp.net

This is my web service code.I don't know how to parse soap response.what should i do? i don't even know it is json or Xml.So please tell me which type of response it is? my response like…
-1
votes
2 answers

How to delete row from DataBase in android

I want delete row from SQLiteDataBase but i can't it and i that ID is not correctly filled! When select Delete button show me "Data Not Deleted" Toast message. Attention : Please do not disappoint me and don't give me negative points. I searched…
dfgh
  • 29
  • 7
-1
votes
1 answer

SQLite autoincrement primary key fields dont allow update

I have got a database table with a column "id INTEGER PRIMARY KEY AUTOINCREMENT". When I try to update an existing row of this table with the primary key, the app exits saying "Unfortunately is stopped." public int updateUser(User user) { …
-1
votes
1 answer

Why can't my Android app see the database file?

I'm creating an Android app, and I want to make a registration. I have already written the file where is C.R.U.D to database. When I start my app and try to add somebody, I can see the popup with the message: "Unfortunately , the application has…
-1
votes
1 answer

Android SQLite: Update values not working

I'm a student and new to Android and Sqlite database. I've been trying to update the data in my sqLite Database I tried many methods to update the data and after a lot of research it come up with an error in the Update class which is the id.…
Jun'z
  • 67
  • 10
-1
votes
1 answer

Get data from database and use in interface in android

I am using Urls class(code given below) to set different urls I want to use in my app public interface Urls { public String SERVER_BASE_URL = "http://webaddress.com/"; public String URL_DIRECT =SERVER_BASE_URL + "token.php"; …