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

How to set data from database in recyclerview in android

I want develop Android application and i use database for for save data! now i want show this datas from SQLiteDatabase into RecyclerView. How do this work? please send me sample or tutorial for this job. Attention : I am amateur developer, please…
erere
  • 87
  • 1
  • 3
  • 9
0
votes
0 answers

Show null database when use SQLiteDataBase in android

I want use DataBase in my application. I use ListView for show database items, when click on ListView items, show detail in other activity! when click ListView Items for show detail and startActivity show me this error : 03-08 11:48:01.501…
erere
  • 87
  • 1
  • 3
  • 9
0
votes
1 answer

AsyncTask in copy Database from asset folder in Android

I want use AsyncTask for copy database in my application. The application has 4 fragments, and any fragment shows one table from the database (database has 4 tables). But when I run the application, show me this error: Attention : I am an amateur.…
0
votes
2 answers

How to setAdapter to listview in Android

I want use SQLite Database in my application. The application has 4 fragments, and any fragment shows one table from the database (database has 4 tables). But when I run the application, it show me this error: 03-06 18:06:29.969…
erere
  • 87
  • 1
  • 3
  • 9
0
votes
1 answer

Android - How to use transactions when modifying database via ContentProvider?

When a user taps their NFC tag, my app: Inserts a new user into the users table, getting back the user _id, then Writes this _id value to the user's NFC tag. The problem is that if that user moves their tag away too quickly, step 2 will fail with…
0
votes
1 answer

Load More Button Issue in Android

I have created an quote application with list adapter filled from a database. It has a load more button with the 15 items threshhold. It is not showing if the quote size is below 15, but It's showing if the list is 15 and when we press load more…
0
votes
1 answer

android cardview only show the last result the right amount of times

i'm new to android and java. i made a cardview and populated it with a simple loop like so: private ArrayList getTheData(){ ArrayList res = new ArrayList(); for (int index = 0; index < 5; index++){ …
Ron
  • 531
  • 8
  • 23
0
votes
0 answers

How to notify android activity on database update

What are the possible ways to notify activity when something chaneged in DB? What is the best practice? Unfortynatelly i cann't find methods comparation with advantages and disadvantages. I see the following: Observer pattern with keeping…
Mikhail Sidorov
  • 699
  • 2
  • 9
  • 18
0
votes
2 answers

Select on ListView items and show users info from DB another activity in Android

I want show some of users info in listview items and when click on items, show full users info into another activity (such as pass data from database to other activity). I use SQLiteDataBase to save users information. But I do not know how to do?!…
dfgh
  • 29
  • 7
0
votes
1 answer

How to retrieve datas from inserted record to display in another activity android?

Hi I created table to insert record ie name,message and time. I inserted sucessfully but how to retrieve inserted datas to display in another activity. Here is code. //this i have done in Activity A: ContentValues userValues = new…
Star
  • 735
  • 3
  • 13
  • 34
0
votes
1 answer

Getting NullPointerException with AndroidAnnotations & ORMLite

I am using AndroidAnnotations and SQLite with ORMLite and am trying to get the database up and running. I was able to create the table and make a test-insert of a Contact object a few days ago. However, I did some changes and then it stopped working…
Dominik
  • 1,703
  • 6
  • 26
  • 46
0
votes
1 answer

Populate a SQLite database from a website

I searched a bit and couldn't find anything so I'm asking it here: It'd be great if there's a tutorial or example project where I can look at. So far I've only found on how to populate this database using the data that is generated locally, by…
Jasmine Rain
  • 419
  • 2
  • 6
  • 17
0
votes
0 answers

Enter Data in TextBox save and show in another Activity Using Intent

Hello I'm new to android programming. I would like to ask how can I pass data to another activity using intent? My case here is, I have a 2 TextBox , if the user clicks on the button it should be retrieved(the text) to the database. …
0
votes
1 answer

Android ListView with SQL id

I'm working on an app where user will be able to view a list with names, and when he clicks on one, another activity pops up with more details regarding the chosen profile. I've got a ListView. I create it using this code: listContacts = (ListView)…
Oleksandr Firsov
  • 1,428
  • 1
  • 21
  • 48
0
votes
2 answers

Should I close my DBHelper on onStop()?

I have followed this tutorial and now have my own DB Contract and DB Helper classes. I have DBHelper variable in Activity and I set it in onCreate() mDbHelper = new CustomDbHelper(getApplicationContext()); my question is: should I close the…
michnovka
  • 2,880
  • 3
  • 26
  • 58