How to work with sqlite DataBase in Xamarin Android? - 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

Related

Database for data and pictures

I know, that I probably could try to learn everything about databases, but my way of learning is to get first push/hint from pro's and then try to figure out the rest. It narrows down the amount of things to learn at once. So far it works for me.
Long story short- my goal is to create Flutter app for iOS and Android, that can store pictures(preferably converted to PDFs- I'll do that later) and some user entered data about these pictures/PDFs.
Later the app needs to work with this entered data(sort, use, display, etc) and the app should store all of those images.
Ideally, if in future all of the data/pictures could be stored on cloud and accessed from multiple devices/app accounts.
What type of database could be most suitable for these purposes?
This is the first time for me to work with databases, so don't judge me too hard, please :) I just need a direction in which to dig.
P.S. my one goal is to build prototype-app and after it is proved that it can achieve its goals, hire pro developers to do the updates un polish everything.
Thanks in advance.
I would advise you to store your images in a directory structure decided by you. Then you can store the path to these files (along with any other data) in the database.

Is it viable to use a SQLite database in Android with 5Mill entries taking 0.5GB?

I've checked many questions here and do some deep researches about it but none of them matches my doubt.
I'm trying to develop my first app in Android, for which I'm using an external database but I'm quite stuck and probably I will leave this project.
I've done a huge database:
4 Tables
1.3M raws each table
18 columns each raw
I don't need to write anything on this db, just read.
The first problem is going to be the Size: ~ 450mb.
The second problem is: I'm not sure if Android is going to be able to manage a large database since this is my first app, or it's just going to crash.
Previously, I have run some test with a smaller database (100K entries) and it worked, a bit slow in Android Kitkat though.
My question is: Is there any other ways to read from an external Database ?
I was thinking about an online database, so my size problem is solved but I truly have no idea about them.
It will work just fine. Obviously you need the proper indexes on it or searches will take a while. Its probably easiest to download the db from the net, putting it into the apk will give Play store size problems. Your users may not be happy with it though- that's a lot of data for a single app.
As for an online db- yes, you put a webservice between them with a REST API. But going into doing that is too wide a scope for here

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.

I have some really huge string data to ship with my android app?

I have some really huge data that is required for my android app. I've put it into a sqlite db now. Roughly it is 39k rows and 5 columns. I want this data to be available for my app.
I'm kind of confused as to how I ship my app with it. i can ship the db file with it like discussed in this thread. or I can somehow create XML out of that data and ship it along. But the XML would be really huge. So what is the right way of doing it?
I do not want to download it after user installs the app. That'd be my last option if there are no better clean ways of doing it.
This should help you.
http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/
Basically just ship the database with your apk file.
I think shipping your DB could make some problems with compatibility.
Maybe it will be better to use GZIP'ed SQL code bundled to your .APK?
Or instead of XML for intermediate representation you can use google protobuf, which is most effective data representation format(Also, if you have a lot of strings, you can use it in combination with GZIP).
Check the example here to achieve this functionality.

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