Android的JNI,有没有什么办法C ++ code可以直接读取应用程序的SQLite数据库?可以直接、有没有什么、应用程序、办法

2023-09-07 08:41:43 作者:泪如雨,美如殇

我工作的一个Android应用程序与Java组件,并通过JNI C ++组件。 C ++组件被用在其他平台。

I'm working on an Android app with a Java component and a C++ component via JNI. The C++ component is used on other platforms.

这将让我的生活变得相当容易,如果C ++组件可以查询现有的SQLite数据库(通过SQLite的C API),而无需调用外壳到Java端。

It would make my life considerably easier if the C++ component could query the existing SQLite database (via the SQLite C API), without having to shell calls out to the Java side.

我知道这是一个长镜头,有没有人尝试呢?

I know it's a long shot, has anyone attempted this?

推荐答案

没有的NDK只提供有限的API。唯一正式支持的领域是:

No, the NDK only offers limited apis. The only officially supports areas are:

的libc(C库)头文件的libm(数学库)头文件 JNI接口头文件 libz进行(COM的Zlib pression)标题 liblog(Android的日志记录)头的OpenGL ES 1.1和OpenGL ES 2.0(3D图形库)头文件 libjnigraphics(像素缓冲区的访问)头(为Android 2.2和以上)。 C ++支持一个最小的套头

NDK文档。