Is it possible to build a module that works simultaneously on Andorid, IOS and Windows ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By hurtan983
:warning: Old Version Published before Godot 3 was released.

Is it possible to build a module that works simultaneously on Andorid, IOS and Windows ? I’m trying to build a SQLITE driver using the already existing project gdsqlite, which is only PC oriented.

My intention is to fork or contribute the existing one and add the other 2 missing platforms.

Is this possible to do this given the actual Godot Module framework ?

Where I can find examples of such feat ? Godot’s official documentation only shows examples for modules for a single platform.

I think you can make your module work on any platform as long as it doesn’t relies on something platform-specific (such as how the filesystem works or OS-specific system calls that are not handled by Godot already).

In the case of SQLite it seems to me file access is the only thing you need, since it does nothing else than storing data in a file and read/write stuff in and out depending on requests.

Why is the existing version PC-oriented?

Zylann | 2016-12-12 14:00

Thanks for your fast response. The reason why I’m sure that this is only PC oriented id due the fact that android only allows sqlite access on store application using Android’s JAVA API and if you closely look at the existing module it relies on the old standard C++ library. Checkout this:

https://github.com/khairul169/gdsqlite/blob/master/gdsqlite.h

hurtan983 | 2016-12-12 14:09

I don’t get why you would have to use the Java implementation of sqlite :expressionless:
They say it on their website, it’s just an extension of fopen and fwrite using SQL commands. Nothing fancier than interacting with an elaborate XML file. I don’t even think you need sqlite if you have to talk to a service that uses sqlite as backend (because you only have to write SQL).

What do you need sqlite for? You need to open your own database file? Or is it a database you don’t own / remote database?

Zylann | 2016-12-12 19:20