Questions tagged as 'android-sqlite'

2
answers

Benefits of closing a cursor

I have an application in which I use Cursors to save the data obtained from a SQLite query and in many occasions I forget to close them Cursor.close(); What problems can that bring me? Does it consume more RAM in the device? If that...
asked by 13.10.2016 / 18:21
1
answer

Problems reading an sqlite database

Hello, I have the following code that calls the database of my application. All I need is to count the amount of data. I AM ROOT USER public int contar() throws SQLException{ Cursor mcursor = null; mcursor = this.getReadableDataba...
asked by 11.05.2018 / 06:04
1
answer

How to modify the Sqlite Path

I can not change the path of SQLITE . I set up a database in android studio and the class that extends from SQLiteOpenHelper I have: public Constructor (Context ctx){ super(ctx, NombreBase, null, 1) }...
asked by 19.12.2017 / 04:06
2
answers

How to instantiate a class of type SQLiteOpenHelper in another simple class

I have two classes one of type SQLiteOpenHelper and another normal one public class dbdata extends SQLiteOpenHelper{} and another public class parsers {} The Parsers class, reads a json, and I want it to read when I save to the sqlite...
asked by 26.04.2017 / 22:12
3
answers

I get an error in the AUTOINCREMENT-AndroidStudio field

I want to create a database for a calendar and I need to create a field of type AUTOINCREMENT . The fact is that when I create the database in Android Studio with SQLite it underlines me and gives me the following error:...
asked by 19.12.2018 / 10:41
1
answer

Error with RawQuery in SQLite

Good friends, I made my database to do the registration of users and their login, I used separate classes for the base: public class Usuario { private int id; private String nombre; private String password; public Usuario(int...
asked by 01.12.2017 / 10:48
2
answers

how to validate those that do not have empty data in Android Studio Form

This is the code: AdminSQLiteOpenHelper admin = new AdminSQLiteOpenHelper (Alta_Alumno.this, "administrations", null, 1); SQLiteDatabase bd = admin.getWritableDatabase(); String Matricu...
asked by 25.10.2017 / 23:33
1
answer

How can I copy database to the sd card?

How could I copy a database that I store inside my own app to the sd card, for example if I create a folder within app\src\main\res and store the bd in that directory, as I could copy it to the sd card. ?     
asked by 17.05.2017 / 05:08
2
answers

do not delete SQLITE-Android database

It occurred to me to create an application that allows recovering user data when reinstalling it on the device. All the apps that I have previously created keep the information in a database and the information is lost when I uninstall the appli...
asked by 13.01.2017 / 19:43
1
answer

SQL query with Asynctask passing parameter

I'm doing a class that extends Asynctask to make a modification to my database SQLite Android, to perform the query you must pass a parameter to the method of the query, but I do not know how to pass it to the Asynctask class, I have this for no...
asked by 03.01.2019 / 10:51