Connection between Oracle 10g and Android - android

i have a database in my laptop. i want to access it from an android application. since i am new in this field, i don't have a least idea about connection android with oracle. please suggest me how to do it?
i am using oracle 10g express edition. i want to retrieve a table data to my android app from my database.
please give me the codes that i will need to perform this task.
what files do i need to perform the connection.
Thank you

You should put a rest or soap service in front of your rdbms and let your mobile app communicate with it.
For php webservice (on a windows based machine) you can setup xampp with php oci8 drivers and oracle instant client.
You can use http post or get method from your android app to transfer data from your app to your webservice and vice versa. You can execute your sql queries from your php script(webservice).
If you don't want to build up you're own web service, then you can use oracle database mobile server
http://www.oracle.com/technetwork/products/database-mobile-server/overview/index.html

You need simple java util see attach
https://docs.oracle.com/javase/tutorial/jdbc/basics/processingsqlstatements.html

Related

Android using mssql server [duplicate]

I'm currently developing a Field-Service application that stores data in the local sqlite database on an android device. At some point, usually after completing the data collection rounds, the local sqlite db is to be synchronized to a remote sql server db on the server, also i need to update some local table from sql server db.
Any suggestions as to how this could be achieved or engineered as a solution? Or even better, are there alternatives to synchronizing data in such an application?
I think that the best is using a intermediary like web services or your own TCP based logic layer for your application which would connect to SQL server and execute requests of your applicatation. Don't try to connect to your SQL server directly from Android. You can write
some backend code on your server (or webservice) and then call those code methods from your android device using Http.
And also there are many themes in stackoverflow like your:
How to connect Android to a database server
Connecting android with MS SQL SERVER 2008
About how to write web services. It's a big question, and you must choose technology, there are very many libraries, frameworks and platforms that help you to simply write a web service. You must choose communicating protocol, it may be SOAP, WSDL or maybe remove calling procedure, it may be rest application. If you use java stack, there are some popular frameworks at the moment:
Apache CXF
Spring Web Services
Axis2
You can start from reading what a web service is:
http://en.wikipedia.org/wiki/Web_service
Also some links which provide example of accessing web services from android:
Step by step to access web service from android
Android and soap web services
Accessing restfull web service with android
Another and much easier approach is to use a Virtual JDBC Driver that relys on a secured three-tier architecture: your JDBC code is sent through HTTP to a remote Servlet that filters the JDBC code (configuration & security) before passing it to the MySql JDBC Driver. The result is sent you back through HTTP.
There are some free software that use this technique. Just Google "Android JDBC Driver over HTTP".
You would have to keep a middle tier online server.Which may communicate to and fro between your application and MSSQL db.May be servlet or a request handler which synchronises between the SQLite and SQL Server db.

Sharing data between Android App and database based windows server

i am trying to share data between Android Application and database based on windows IIS 8.0 server. Our website is build using asp.NET.
I just want to find out what are possible ways available and their algorithm in easy language and What are the apis available in android and java library which i can use.
My application will download high amount of data including texts and images.
And want to keep my app as much lighter as possible.
Like 1 - create connection using
2 - create session using
3 - and so on ...
I appreciate your help.
Thanks
Karan Nagpal
There are some easy steps which can help you.
1. Create a listener in asp.net which will be hosted on IIS.
2. Call listener from mobile device via HTTP.
3. Call stored procedure or simple sql statements to fetch data from database and send back to mobile device in the form of Http Response(text,xml,json).
Hello check this page you can get what you want
Android connectivity with php and mysql
The concept is same for every language you can use MSSql and .net in the place of php and mysql.
Thanks

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

Connecting Mysql with Android

I am new for Android Development. Now I want to connect Mysql with Android Application for uploading data to the server. Please send any sample code for connecting mysql with Android.
There is no MySQL connection library for Android that I'm aware of, unless you can get the MySQL java library operational under Android.
Either way, you don't want to do this - that would mean exposing your MySQL server to the world for TCP connections. There's no way to tell what IP your device will be appearing from. Each mobile carrier has their own internet gateway for devices, and it's invariably a NAT firewall to boot. This would be require you to leave MySQL wide open to TCP connections from all IPs, a major security hole.
Instead, you should build up a web service that acts as a middleman between your app and MySQL.
You can use MySql to connect to your android application through a servlet using Apache Tomcat. You will have to put your SQL syntax into the servlet you created and in your Java insert the URI path for the servlet.
i believe you need apache tomcat to run a servlet for your sql, do you have it?
The way it should work is , you use the sql-lite database to store the data that is generated in your application.Then, when you have a fixed set of data,convert into a protocol buffer, transmit the same via web-services,depacket it and store into a mysql database at the server.
If you need to manage data in a private database, use the android.database.sqlite classes.
Not sure if android supports mysql.
Go through the Notepad Tutorial for information on connecting to sqllite
http://developer.android.com/resources/tutorials/notepad/index.html
Other than sqlite we can't connect with any other database.
Using sqlite is also not a good practice, better use web service calls.
It is because, some viewers will be having less memory phones, has we are doing the application global, we should think of these things.
For small requirements you can use sqlite.

how to allow android to access/modify a remote database

I'm running a .net aspx application. I'll need my android app to access and modify/insert information into the ms sql database. is there any api ? thank you
You don't need any special API. Just use Android's HTTPCLIENT and perform POST and GET operations against your ASP.NET application to access and modify SQLServer's data.
Not that I'm aware of but you could write a server app on the client machine (or any machine with access to the DB) and connect to that via your android app and send commands.

Categories

Resources