On 20.11.2025 at 11:58, Tomasz Tyrakowski wrote:
> So, my question is: is there a working app / project / demo / test app,
> with source code available for reference, which uses Firebird embedded
> on Android, that actually works? In any language / SDK?
> I've checked that ICU 6.3 libraries are included in the embedded aar
> archive downloadable from
firebirdsql.org (FB 5.0.3 embedded for
> Android) and the libraries get copied to proper locations inside the
> resulting apk when building the app. But maybe, at runtime, somehow the
> embedded engine doesn't load those libraries and tries to load the
> system-wide ICU from local Android, which results in a version mismatch.
> A proof of concept working app would be helpful for reference (there
> doesn't seem to be one in Firebird examples or perhaps I don't know
> where to look), so if anyone knows of such a project, please do let me
> know.
After some more tinkering I'm still unable to make Android embedded
work. No matter what I do, when attaching to the database I get back
error 335545167 ("Could not find acceptable ICU library").
I've tried it on Android 13 to 16 (emulated) and Android 15 (physical
device), using the official 5.0.3 embedded aar from
firebirdsql.org.
I've even changed the icu_versions in assets/firebird/fbintl.conf inside
the aar from "default" to "63.1" (to match the libicu libraries shipped
inside the aar), but the outcome is always the same.
As far as I can tell, the application successfully loads libfbclient.so,
so it finds the client library (deployed from the aar) for the correct
architecture in the installed app bundle.
This web page:
https://developer.android.com/guide/topics/resources/internationalization
lists the ICU versions installed system-wide on different Android
versions. No Android version ships 63.1 (the closest is Android 10 with
63.2), Android 13 has 70.1, Android 15 has 75.1.
I've analyzed unicode_util.cpp in the Firebird sources and it looks like
UnicodeUtil::getConversionICU() tries different ICU versions until one
of them can be loaded. If none can, the isc_icu_library error gets thrown.
The preferred version is 63.1, which is the very version shipped in the
embedded aar, but somehow the engine (or libfbclient) doesn't see those
libraries or doesn't attempt to load it.
So, I come back to my original question: does embedded Firebird on
Android actually work, if it does, does it require some special
initialization in the application code, apart from loading libfbclient
and accessing its interfaces (mater, util, provider, etc.), just like in
a standard client-server version?
Is there a working example or a test suite that proves it really works
on Android (can it attach to employee.fdb in embedded mode)?
Don't get me wrong, I'm not trying to force any confessions, it's just
that if you guys know it doesn't work at the moment (e.g. due to ICU
problems), it would save my time trying to find a fix or a workaround.
regards
Tomasz