Subject Re: [Firebird-Java] Re: JayBird + Firebird on Android
Author mariuz
On Thu, Nov 17, 2011 at 09:42:17AM +0100, Mark Rotteveel wrote:
> On Thu, 17 Nov 2011 08:27:48 -0000, "oleg_ma" <oleg_ma@...> wrote:
> >> How to connect to the Fireberd from android application ?
> > Class.forName(FBDriver.class.getName());
> > Connection connection =
> > DriverManager.getConnection("jdbc:firebirdsql:192.168.3.22:employee",
> > "SYSDBA", "masterkey");
> >
> >> Where does Firebird run?
> > Firebird run Linux server
> > Plan to use connects via Wifi networks connection (Android 2.2)
>
> Looking at
> http://stackoverflow.com/questions/1728476/does-android-support-jdbc and
> remembering the error you received, I suspect getting Jaybird to work on
> Android would require quite some work rewriting the driver to work. I think
> you will probably be better off (and more scalable) to create a webservice
> near the database and having the android application access that webservice
> instead of accessing the database directly.
>
> It will probably also be more performant and more secure (the 'insecure'
> mobile phone can only perform those actions that the webservice exposes),
> and will probably improve the technical design of the application.

I have seen that some apps sqlite put their own jdbc classes and the driver inside
(I saw some in the android git sources and i will dig deeper)
1. put all jdbc related classes even the ones google will not support in the future (just to be safe)
2. add the jdbc firebird pure driver
3. also put what firebird driver related classes that are not yet included in android sdk


I have seen this app pgtop http://www.slideshare.net/markwkm/pgtop-for-android-things-i-learned-making-this-app
https://github.com/markwkm/PGTop

so it seems that is loading the pg jdbc jar
so it is possible to do the same with firebird jdbc one

All we need a android friendly build of jaybird (no native for the moment)

>
> Mark