How do you insert user input into an SQLite Database in Android?
July 26th, 2011
So I’m fairly new to Android programming, and I have an SQL database class set up, and I can add items to it just fine from within its own class. The problem is that I can’t implement a method in my main class to add items to the database, it just crashes the application. How do I access the database from a separate class?
I have tried creating another instance, however since the database class is also an Activity, it crashes the program


If you create a new instance of the database class from the launcher activity to set it up, surely you could just create a few public methods in the database class to insert/update/delete etc from the launcher activity?