![]() SQLiteDatabase database = SQLiteDatabase.openOrCreateDatabase(dbFile, null) Ĭursor c = database. String directory = Environment.getExternalStorageDirectory().getAbsolutePath() įile dbFile = new File(directory+ "/large.sqlite") Don't forget the uses permission import And now I want to retrieve data from it but I want just insert one data and retrieve it then display it into a TextView. See the code below (i have manually put the sqlite "large" on my phone, then i open it & list the tables inside for testing). I created an SQLite Database in my app, and I insert the data into it. Yet, you can easily do what you want using the android classes for sqlite database. I think that he ketai "load()" method uses the path to this folder and is not able to go elsewhere. sqlite when created or used are stored in a folder called "data". In MainAcvitiy, inflate the menu by overriding onCreateOptionsMenu.Default android.Add a main_menu.xml menu resource file to res > menu.Ĭreate a menu with one item Search.In your project, create an Android Resource directory and call it menu with "menu" as the resource type ( res > menu). ![]() Use the OptionsMenuSample code from your previous practicals if you need an example of how to do this.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |