How to access SQLite database in Android Tablet? - android

I need your help on SQLite database development, We have an application existing with 3rd party database which help us to store collected measurement data using Android Tablet.
For example : Time of recording, Latitude , Longitude.
These should be recorded in mobile and tablet devices.
I tried to get database schema through the DDMS file explorer but I do not see any .db file.
Usually these are stored under data/data.
Our intention is to create own SQLite database and this will support to store huge data.
In above scenario, how should I get 3rd party database schema ?
I have tried, but it doesn't gave me successful result with emulator and SQLite manager ?
In general how do i access db in real device?

If your database supposed to store some huge data, you should set your database on a server and connect to it from your application on the android-device via internet.
For this you have to know How to connect to a SQLite database and config the server's firewall to have access to the database using your app.
Follow these links :
http://www.codeproject.com/Articles/119293/Using-SQLite-Database-with-Android
http://www.vogella.com/tutorials/AndroidSQLite/article.html

Related

How to make changes to sqlite database for app that is installed in multiple devices?

I started developing an app that uses sqlite that is to be installed on multiple devices and any updates done on sqlite database from any device are to be reflected in other devices as well. I have researched a little and found that Sqlite DB is local to a device and changes done in one device are not reflected in others and for that I have to use external server. Is there any way around it?
Is it optimal to directly store data in external server or use sqlite and sync it regularly with external database?
Thanks in advance
As far as I know, there isn't a way without an external database. I would recommend you to sync it regularly with an external database.
Checkout this question for more information how to do that:
How to sync SQLite database on Android phone with MySQL database on server?
Answer of Andrew White
Create a webservice (REST is probably best) and serialize your SQLite/MySQL data and PUT/POST/GET it to/from your web service. This will give you a nice layer of abstraction in case you decide to switch from MySQL to something else server side.
You will achieve your goal using external server. It's not necessary to create your own server, just use data store services like Parse. For more look here.
You can use data directly from external server or cache them on your device first (sqlite, prefs, json etc.) – it's up to you.

Accessing external database from Android app

I have a sqlite database with about 15MB of data (too large to store on each device). I am building an app to interact with this data. How to go about accessing the database from wherever the app is being stored. I'm not asking someone to do it for me, but where do I go about researching how to do this. Is there an android module that does just this after being passed an ip address (or FTP Server IP?). Where do I start researching the best way to host my database and then link it to my app? What's the high level brief of how this is accomplished? Thanks!
Two ways
You can send a query to the web server and retrieve the result (you need the web server URL that received your query and send the result through HTTP).
You can download the database and put it in the app database directory and then you can query this database.

Android Database SQLite or MySQL?

I am new to Android Development and I'm developing an application for my Final Year Project.
I am a little confused as to when it comes to setting up the database. I read a few things and most people seem to use SQLite.
Basically I am developing an android app which has too different aspects to it.
1. admin inputs data on the app and saves to a database. 2. users open app and view data from the database.
The data is going to have to be input and viewable over the 3g/wifi network.
Do i need to host my database online and which database would be best to use? from reading it seems SQLite is hosted on your local disk so should i use MySQL?
Any help would be grately appreciated.
Thanks
Android includes SQLite. So, if you save data in a DB on an Android system itself, you use SQLite. If you store your data elsewhere, you are free to use whatever you like, Oracle, DB2, Mysql or even SQLite.

Android Database - Write and Read from Server

I need to design an Android application that stores a database on a device and a copy of that database on a server. This application also needs the ability to query the information based on username, date, and three other parameters. What is the easiest way to go about this? I'm new to programming and any help would be appreciated.
To create Database in your Device you can use Sqlite.Refer Android Documentation for Storage.
Also create a copy of this database on your server and sync these Server Database and Local Database.
(Or) you can use Syncing to the Cloud google cloud storage and sync the local device database and cloud database.

Android: Connect to Oracle database via username and password and present data from the database to user?

I'm developing a web app with Java Servlets that can access an oracle database through the Tomcat server. I am also developing an android app that I want to use to be able to display the information that is stored on this database, so I will need to provide the user with the ability to log on and access the data from the database. The information will then also have GPS coordinates to display the items on a map.
Any ideas of the method or process involved in achieving something like this? Thank you!!
One really easy way to solve this problem involves using another product from Oracle, Database Mobile Server.
Having your Android devices connect to Oracle Database over the network has serious security and other implications.
Instead, you can just use the local SQLite database that is built into Android. Database Mobile Server provides a sync client that runs on each Android device, and synchronizes the local database with the remote Oracle Database in the background.
You can read more about the product and download an eval copy here:
http://bit.ly/tLjaF7
Good luck with your project.
Regards
Eric, Oracle PM

Categories

Resources