How to connect my Android app to an online mysql database? - android

This is my first post on StackOverflow. So I apologize if such a post exists already.
I have created a Movie Database using WAMP MySQL that is currently saved on my computer HDD. I'm currently working on an Android app that can manipulate my database (update tables, delete rows, fetch information) & will also show which DVDs contain which movies (I have over 1TB of movies stored in DVDs).
So how do I go about it? Do I create a completely new database online using those free Database hosting sites available or is there a way I can connect my android app to my WAMP Database server & access it from anywhere I want with the help of Internet?

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.

How to access SQLite database in Android Tablet?

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

Connecting an already existing database in Android

What is the best way to Connect an external database in my android application and retreive data from it? i am trying to develop a simple Quiz application where the questions and their options should be retreived from database. i have created the database using SQLite Browser.
I have seen lot of tutorials which tells how to create database and use it in android. But i couldnot find any tutorial which teaches me how to retreive from already created database.
Your question is not clear
If you are going to connect to a pre-created and prefilled database then you should embed that SQLite Database file in your APK and connect it and proceed like you’ve seen in tutorials. have a look at Ship an application with a database
And if you want to retrieve data from a database exists on a remote machine then you have to expose data using one of web service technologies (for instance, XML Web Services) and consume it in your Android App.

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: 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