I have been making some good progress on my first app and getting it slowly working the way I want it to. I have added Speech Recognition that will allow the user to say what they think the Spanish word is in English and I compare that word with the one from my database then notify the user if they are correct or not. I have also added Text-to-Speech (TTS) so the user can hear how the word is pronounced correctly when learning how to speak the language. The next items that I will be working on will be the settings database, the menu and the settings page. I don’t think it will be very hard to get those working but it will take a little time to get everything I need created.
When trying to copy my premade SQLite database into my app I found this website on ReignDesign that helped a lot. It showed me how to modify the database to work with Android and some code to get it working. It took me some time to play with the code in order to get it to work for me but I was able to get it working. Bellow is the code from the website that I used.
My first attempt at creating an Android app is going along very well. Now that I am over that first big wall of figuring out how to copy the premade SQLite database into usable space, I am now adding features left and right and getting the results that I wanted. So far I have been able to pull a random word from the table, pull a random word from a category and a random word that has been marked by the user for needing more practice. The latest part of the code that I have been able to get working is updating the marked word column with a toggle button. Next I will be working on creating the screen menu and a full menu screen as well as creating an Android made database. That database should be very easy and should not give me very many problems. Famous last words as one would say.
I have been talking with a friend and I have decided to post all of my code on this site. I really want to clean up the code a little and add some notes before posting. Hopefully someone will find some of it useful when trying to build an app. If you think my code may be able to help you with your project, let me know and I will post it early and just make edits as needed.
It has taken me some time but I have finally been able to do it. I was able to copy my premade database into my app and I have pulled rows of data from it. I will work on cleaning the code up and putting comments into it. Once I am finished with the edits I will post the code to a page on this site. It was very exciting when my app loaded into the emulator without errors and the database appeared to be copied over. I did have a problem where it looked like only half of the data from the database was copied over. My test database comes to 8kB right now and the emulator was only showing 4kB worth of data. I don’t really know what was the problem and I will need to look into this more but I found out that if I checked if the database was there and if not ran the copy again after doing that check the database fully copies over without a problem. I am now working on the other functions of my app and hopefully I will soon have a large part of it working.
Since I have finished the main GUI of my first Flashcard app I will need to start working on getting the SQLite Database created and working. Using SQLite Database Browser I have created a test database that is small and has at all the different kinds of information in it that I will need to test the function of. I have the _id field, a word category field, English word field, Spanish word field, a note field for future use, and a mark field to set words for future studying.
Now comes the fun part. Figuring out what features I want and need in order to get the SQLite Database created in android and work the way I want it to. I will be going over what I have learned in a future post and I am planing on making a page that covers everything in great detail on working with an SQLite Database in Android.
For my first set of apps I will be creating a flashcard app that will be useful for learning different languages. It will be using a SQLite database that I will create and Android will use to copy into and use the data for the apps use. My first creation will be simple and have English and Spanish words. You will be able to touch the displayed word and hear the punctuation and when ready you will have to say the correct translation and the app will verify if you are correct. There will be a few other features that I will be working on to enhance the user’s experience. I will add another post about my progress and things that I have learned along the way hopefully not too far from now.