I'm trying to get started with Firemonkey, Android, FireDAC in XE5. Task: Connect to MySQL-Server.

I'm trying to get started with Firemonkey, Android, FireDAC in XE5. Task: Connect to MySQL-Server.

First I built an example app with TFDConnection and compiled it under Win32 - works nice.

Then I wanted to switch to Android. First observation: No FireDAC libraries for Android available... but the sources are. Ok, added Program Files(x86)\Embarcadero\RAD Studio\12.0\source\data\firedac\ to library path and let them compile for Android. At least it compiles now...

But when running the app on the Android device, it is looking for libmysql.so (the Win32 program also needs libmysql.dll which can just be downloaded). I tried to search for a corresponding package for Android but it seems hard to find anything about that.

Seems like MySQL-Support for FireDAC/Android is not yet fully supported? Any other way for connecting to MySQL or fetching some data (via PHP?)... ?

Comments

  1. This is probably because there is no such native library for android, that I'm aware of. Php is a popular way to go, or you can import the Java database library - android has built in database support.

    There is a Java mysql library, you could try getting that to work in android and using jni to interface with it.....

    ReplyDelete
  2. The recommended way to connect to any non-local database from iOS and Android is DataSnap.

    ReplyDelete
  3. I'm not common with DataSnap so far, but if I got this technology right, this would mean to create a server application first which then communicates with the client app?

    If so, this would not work in my case. I have a LAMP server running the MySQL-DB. There must be a way to connect via Firemonkey (Android) to this?

    ReplyDelete
  4. Well, perhaps someone will compile a native solution for android soon? I think I'll need to do the same thing soon, but not immediately. I know such a thing exists for iOS.

    ReplyDelete
  5. Devart offer MyDac which is Data Access Components to MySql, it doesn't require libmysql.dll on windows, and they now support iOS and Andorid, but not sure if they support direct access from android or not, try to contact them.

    ReplyDelete
  6. Finally, I chose this approach here:
    http://phprestsql.sourceforge.net/download.html

    Seems like the only thing for Linux Servers ... REST interface can be implemented in Delphi XE5...

    If someone is interested in results, just contact me :-)

    ReplyDelete

Post a Comment