I need to access data from an external oracle database from my application android to update the local database application, but I don't know what would be the best way to do it. Would I need to create a web service to access to the oracle database or there is another simple way?
Thanks
Have a look to my Android-Oracle Connectivity blog post. That will hopefully help you. If still you have problem. Let me know about it.
in Android you can only directly connect with SQLiteDatabase.. if you want to connect with MYSQL or Oracle it is necessory that you have to make web service whether it will be on PHP, .NET or on JSP.. but without web service you can not use oracle in android...
it also can done through JDBC connectivity but i dnt have exact example of that...
You have (at least) two options:
Use Oracle Database Mobile Server. (Best, safest bet)
Download the JDBC Drivers and connect that way. (Not recommended, unsafe - especially for over-the-air connectivity)
You can not directly access the Oracle database from android Application. you need to create webservices in PHP, .net or in Java to make connection with Oracle Database. After creating this webservice , you need to connect your application with the webservice. This is the simplest way of connecting with Oracle Database.
ORACLE DATABASE CONNECTION WITH ANDROID THROUGH LAN
Grant Some Manifest Permissions
MainActivity Class
Prerequisite are: Note there is no need to add dependency lib ojdbc14.jar just copy ojdbc14.jar to your JAVA_HOME jre -> lib -> ext & paste here ojdbc14.jar then first manually check jdbc connection by cmd/terminal make any simple java program http://www.javatpoint.com/example-to-connect-to-the-oracle-database