I need to connect my android application to my firebird DB
do someone knows how to do this?
please write the code!
I'm not particularly familiar with Firebird, but my guess is the best approach would be to use a web service of some sort (RESTful?) which allows your Android client to communicate with the database. This is the solution that is typically used for most apps since you can't connect directly to the database from Android. It's also good from a design standpoint because your application does not depend on the underlying database itself, but rather the web service which acts as a mediator, meaning you can swap database implementations without impacting your client.
Since Jaybird (Firebird JDBC driver) doesn't support Android, you need something more "hackish". Commercial solution would be using midware, eg RemObjects DataAbstract supports Android (pre-order/beta stage) and Firebird: http://www.remobjects.com/da/java.aspx
You can try this Jaybird port for Android:
http://sourceforge.net/projects/androidjaybird
Related
I am currently working on an Android project and will have to manage database connection and queries to store data. I will not be working with SQLite as provided by the Android device and using it is not an option.
As I need to build quite a lot of queries I wanted to use a library or framework to make the task easier. Looking at what was available, it seemed easiest to use a framework such as, for example, QueryDSL.
However, since I am working on Android, I am not sure if the framework is usable and what using it would entail. Does somebody have experience using an external database with Android and have any recommendations?
The recommended way to connect to an external database is to use a REST client.
See this post
I want to connect an android mobile program to a C++ program, and i dont really know how it should be done.
I was thinking about a Bluetooth connection, but i dont really know how to handle bluetooth in C++. Could you give me some general advice about this?
If you think that i should use another kind of connection, like tpc-ip based, please, let me know and give me some general advices too.
I need the data transfer to be fast, because im trying to use the android device as an interactor, so i need a fast feedback from the C++ program.
Thanx.
If I were you, I would use a TCP/IP connection. It is very easy to implement in Java (Android) and also in C++. Besides, it makes it easy to change the frontend later on. And it is as fast as your network connection, which is usually faster than bluetooth.
Just make sure you put enough effort in the design of your protocol.
There are a lot of resources to be found on the internet on how to create TCP/IP connections, both in Java and C/C++.
If you wanted to have a client server model kind of an use here. Better is to host your Server app(Port your C++ app to Java servlets) & access the Server app via http via Android client. Webviews in android are very useful in doing these.
I'm getting started on a contracting project bid, and I was hoping for some advice on the best way to go about it.
I am being asked to develop an Android application for inventory management for a small company (no more than a few thousand SKUs at most) for Android tablets and I'm trying to come up with the architecture for the system.
I was thinking of using MS Server 2008 hosting a MSSQL database. This database would be exposed via REST services, as the DB would need to be accessible remotely (through Android tablets by salespeople).
I haven't used SQL much in the past, but I am thinking this is likely the best solution, along with REST for performing remote DB transactions.
Basically the functionality would be to view stock, order items, check prices, etc.
I would appreciate any advice anyone has on this topic.
Thanks!
I recommend you go over this article: Creating an OData API for StackOverflow including XML and JSON in 30 minutes. Then, consider the odata4j project.
Also, here is an interesting lecture about clienting REST for android:
http://developer.android.com/videos/index.html#v=xHXn3Kg2IQE
I would go for Oracle Application Express. They have build in Jquery Mobile and easy to expose a report list as Rest web service. Then use Phinegap and Jquery for Android apps.
Take look my quick sample: http://m.youtube.com/index?desktop_uri=%2F&gl=US#/watch?v=5rfuq-e-_Ws
You are not building an enterprise system....give a try Oracle Apex...you will be addicted to it.
Phonegap, Jquery Mobile and SQLite as local database on Android tablet .... Only if you need offline capability. Otherwise just use Oracle Apex with build in Jquery Mobile will be super solution!
I recommend you take a look at restSQL, an ultra-lightweight persistence framework. It currently supports MySQL and PostgreSQL. See http://restsql.org. It runs in a standard Java EE container, e.g. Apache Tomcat.
restSQL is not a conventional ORM. It does not present an object-oriented view of the database. It presents flat or hierarchical "views" of relational database tables. These views are query-able and updatable through a simple REST-based HTTP or Java API. The HTTP interface is based on REST principles, which use HTTP’s built-in features, rather than abstracting away from them.
I have used http://www.remobjects.com/ for this. Create the server in .net, delphi and clients in anything.
Also, is possible to use just http://www.remobjects.com/da/relativity.aspx if not have heavy logic in the middle-tier.
I have to integrate an existing javabased Framework (whith different components which communicate via SOAP) in my Android. Every Component needs to receive and send SOAP-Messages, needs to act as a Server.
Is it true that Android OS < 2.0 does not support Server functionalities? What would be the min. Version?
Which framework can i use? I only found a few kSOAP examples for the client side, but none for servers.
Thanks for every hint, link, idea... help:)
Fabi
You best bet would be to run e.g. jetty as a server on Android but I would seriously reconsider your architecture. Why do the devices need to act as server? Are they being contacted in a pull way by another device or server?
yeah you're right... reconsidering the architecture would be best. But i can't change the existing framework which comnponents i have to use.(yes, a pull way communication is implemented)
Thanks for your help. But i just decided to use the framework by implementing a polling-service. A lot of extra work... but it will do it:)
fabi
I am currently developing an Android application. I want to be able to access MySQL from my website directory without needing to use JSON, SOAP or PHP in order to access MySQL. Is it possible to to import a MySQL connector into an android app.
Thanks for the help
You can use protoBufs instead by Google or use mySQL's connector example here but using the connector wouldn't be safe as #Shaun said in his answer. So it is possible.
Wow, I like how someone actually said its not possible. This is java we are working with isnt it? Its not easy is the answer. You can always take a java library already written for this in full out java, and rewrite it to work with android. The problem? Its not easy, thats why there is not a very well known library for it yet. Theres alot of connection issues, and security issues to think about when doing this from a phone. One, you dont have a dedicated stream of connection (meaning, your connectivity could drop at any moment) and your data could be corrupt, or, you query coudl have left out the LIMIT at the end you could whipe your database. Secondly, you have to worry about the security of your database. Phones are in no way the most secure devices out there, let alone android.
No this isn't possible. You'll require a web service front end.