create db,table and insert data and retrieve it in android - android

I am new to android.
Can anyone please help me to create db ,table and insert data and retrieve it make it display in list.I am really in need of your help.

There are too many examples of how to do it:
Android SQLite Basics: creating and
using a database, and working with
sqlite3
Android Data Storage

The NotePad tutorial in official developer's page is a good starting point.

Have a look at Romain Guys Shelves application it's a very good start point.

Related

How to work with sqlite DataBase in Xamarin Android?

I searched for along time for how can I use a pre made Excel table, as a reading database in Xamarin.Android.
Of course I can't use it directly, so I tried many different ways. For example, convert to Json, upload to Firebase, and later download it, while the program runs, and fill the sqlite. This way is not effective aadn most of the time doesn't work.
Is there any chance, that someone could please explain or even give a tutorial on how to create sqlite database and work with it directly? If there any other worse or better ways to do it, please tell me.
Thank You!
If you want use sqlite DataBase for Xamarin.Android, you could use sqlite-net-pcl.
Install from NuGet: sqlite-net-pcl
You could cgeck the MS docs from the link below for reference. https://learn.microsoft.com/en-us/xamarin/android/data-cloud/data-access/using-sqlite-orm

Android - adding data to an excel file

Good day mates! I want to make an android application that is used to record the attendance of a certain group of people, a class for example. I am searching the internet about my problem and yet I didn't found an answer. My problem is this, I want to have an app that generates an excel spreadsheet and then add data to it from time to time. I have already made an application that makes an excel file but I can't edit or update data in its cells. I respectfully ask for your help with this mates. Any guidance and information will be greatly appreciated. Thank you!
I would suggest you to use SQLite Database which is very easy to create and maintain. You need only to create one helper class to perform all db actions.
See this and related examples.

Making a database with android?

I'm working on an android project that requires writing to a created database and later reading from it.
The idea is for the user to fill out a form and then submit, it will submit into a database table in the first row. Then if they hit submit again it will submit to the second row.
I have all of the activity layouts defined but I'm confused on how to make the databases. I'm thinking maybe I can make a content provider?
Can anyone advise me on what to do? All of the questions I look at on here skip the baby steps, and that's what I need
Yes you should make a content provider. There are a lot of great tutorials out there for making databases - try section 8.0 of this one
http://www.vogella.com/articles/AndroidSQLite/article.html
Since you plan to use a pre-loaded (created) database wherein the DB structure has been already defined, Refer to this link on how to include your pre-created DB file into your app :
http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/
And to then add new data to your database refer to this tut.. You can ignore the create Table part here since you already have the table structure ready.
http://www.androidhive.info/2011/11/android-sqlite-database-tutorial/
Hope this helps.
First of all you dont need Content provider...Content provider is only need when you want to provide your data to other application...Its kind of central repository of data for other applications.
Now You have to use the SQLITE database in android...Since android support sqlite database..
Below link will guide you...
http://developer.android.com/training/basics/data-storage/databases.html
Google has large manuals for all the aspects of Android development http://developer.android.com/training/basics/data-storage/databases.html
it might be done without content providers too.
this might be helpful.
http://www.androidhive.info/2011/11/android-sqlite-database-tutorial/

How to select a particular record from database(SQLite) in android?

Hello Everyone I am very new bee in android, so I am little confused on retrieving data from table... Should i use put(cv.put(DatabaseHelper.TITLE, title);) or get(cv.get(DatabaseHelper.TITLE, title);) to retrieve data from my class. Thanks
My best answer based on the information provided:
Use get to retrieve, i.e., get, data.
Also, take a look at the notepad tutorial for a decent introduction to using databases from an Android app.
I prefer get to retrieve data
for more info Check below link:
Its explaining all basics about sqlite dataabse with android
http://droidreign.com/2010/10/dev-tutorials-android-sqlite-database-basics/

android database issue

I am new to android.
I have an application where i am calculating the loan amount based on salary. For that I have a database of salary,Tax and medicare column. The tax and medicare depends upon the salary bracket. I want to know how to create the database and access it through the coding.
If any good sample code example is there please give the link.
Thanks in advance.
Here you can find a simple and straight forward tutorial from anddev.
Summarize from the tutorial:
Description: We'll need to to the
following things:
Create a DataBase (generally this is done just once)
Open the DataBase
Create a Table (generally this is done just once)
Insert some Datasets
Query for some Datasets
Close the Database
Android uses the SQLITE database Read up on it here: http://www.screaming-penguin.com/node/7742
I assume you have read the official Android developer guide. If not, there is a wealth of information about doing anything and everything you'd want on an Android device.
Since Android uses SQLite as it's internal database, I'd suggest reading documentation about it + the data storage part of Android guide.
These would be good starting points.
You may try this simple tutorial with nice graphics illustration.

Categories

Resources