Categories
Mastering Development

problem selecting from listview of multiple columns from sqlite database

im having troubles selecting from my custom listview and getting the itemName from the sqlite database. i place some other code below, not sure if they are necessary. The Log.d(TAG, “The name is” + itemName); is returning “The name is mypackagename.ListItems@ece56a4” which is not the name Log.d(TAG, “The ID is” + ItemID); The ID is […]

Categories
Development

Don’t undestand why my file appears to be unreadable

I’m trying to write a dictionary to a file. and when I try to read it back, it returns nothing, as if the file is empty. I saw the file and there is something written into it. I think that the way I write is not the best and that’s why it does the problem. […]

Categories
Development

inserting image in sqlite (android studio)

So I asked before about inserting images in a sqlite database which some users helped me and suggested me 2 things and I wanted more explanation and more help specific to my own code. A. storing path/filename in the database and B. this thread questions: 1.) How do I do A? is it simply just […]

Categories
Development

move MainActivity to HomeFragment

I am creating a Dictionary. But created in Main Activity. and i want to move MainActivity event to HomeFragment. How can i move these activity from MainActivity to HomeFragment? I tried to move by create new class HomeFragment2 in HomeFragment.java but List doesn’t appear and I have this error. E/RecyclerView: No adapter attached; skipping layout […]

Categories
Development

java.lang.NullPointerException: Attempt to invoke virtual method ‘int helper.DBHelper.GetLevelById(int, int)’ on a null object reference

Good Day! I’m in the process of building my first android quiz application. Unfortunately, I encountered a problem, and I do not know how to fix it. This is the Stack trace from Firebase Crashlytics: Fatal Exception: java.lang.RuntimeException Unable to start activity ComponentInfo{com.test.reviewer/com.test.reviewer.activity.LevelActivity}: java.lang.NullPointerException: Attempt to invoke virtual method ‘int com.test.reviewer.helper.DBHelper.GetLevelById(int, int)’ on a null […]

Categories
Development

SQLite android studio connection and copy error

I am new to Android and trying to connect database but getting this error please help: -Caused by: java.lang.NullPointerException: Attempt to invoke virtual method ‘android.database.sqlite.SQLiteDatabase android.content.Context.openOrCreateDatabase(java.lang.String, int, android.database.sqlite.SQLiteDatabase$CursorFactory, android.database.DatabaseErrorHandler)’ on a null object reference fragment cursor databaseCopyHelper String DB_PATH =null; private static String DB_NAME = “dictionary.db”; private SQLiteDatabase myDataBase; private final Context myContext; public DatabaseCopyHelper(Context […]

Categories
Development

Getting error when trying get values from sqlite table

I’m using SQLite and is trying get some values from the Database. I have 2 tables in the database. A database called FOOD and one called DRINK. The problem that occurs happens in the FOOD table. I can the erorr message: no such table: FOOD. Which I don’t understand as the the tables and the […]

Categories
Android Development

I’m suffering with the problem for insertion in the android app?

I made simply a insertion folrm which will take the three numbers as input to store in the database (Please keep note that i’m working with the sqlite database). So the main thing is when i click on submit it will through an error which says no such table :-messgae_table. And i try to find […]

Categories
Development

Can we be able to make sqlite3 rows read only using python3

I am trying to make a simple number game and want to store the values in the sqlite3 database and I don’t want to make other users see the database or edit it, I have tried using authoriser it works but only within the code, when i try to edit / delete in code it […]

Categories
Development Python

Can we be able to make sqlite3 rows read only using python3

I am trying to make a simple number game and want to store the values in the sqlite3 database and I don’t want to make other users see the database or edit it, I have tried using authoriser it works but only within the code, when i try to edit / delete in code it […]