#1 2018-10-10 23:48:35

Sapiem
Member
Registered: 2017-12-08
Posts: 62

How open a sqlite database in android using MORMot + Delphi Berlin

Hello:

I have been using mORMot for a while in a Windows application using Delphi Berlin in which the database in sqlite3 is encrypted. Now I want to make an apk for Android that allows me to open the same database on the mobile.

Is it possible to do it from Android Studio?

Is it possible to do it also with Delphi Berlin?

Thanks for the help.

Last edited by Sapiem (2018-10-11 02:15:08)

Offline

#2 2018-10-11 07:48:28

Leslie7
Member
Registered: 2015-06-25
Posts: 248

Re: How open a sqlite database in android using MORMot + Delphi Berlin

Sapiem,

If you mean accessing the database locally on the device then the answer is that a mORMot server cannot be compiled under Delphi for Android.   

You can try to use Lazarus to create an .so with the mORMot engine to be deployed with the Delphi project.  mORMot cross-platform client can be used  to connect to it under Delphi. Lazarus lacks debugging for Android so the engine part is difficult to debug if it has an android specific issue. Otherwise you can connect to a server running on a PC where the server side can be debugged.

Last edited by Leslie7 (2018-10-11 07:51:39)

Offline

#3 2018-10-11 10:18:15

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: How open a sqlite database in android using MORMot + Delphi Berlin

We don't supply (yet) static .o supporting encryption for FPC/Lazarus arm-android platform.

Anyway, switching to a client/server app, with a local storage on the Android device as cache or for online work, is a better option.

Offline

#4 2018-10-11 10:48:08

Sapiem
Member
Registered: 2017-12-08
Posts: 62

Re: How open a sqlite database in android using MORMot + Delphi Berlin

And any way to use in Android Studio?

Offline

#5 2018-10-11 12:30:01

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: How open a sqlite database in android using MORMot + Delphi Berlin

In pure java?

Offline

#6 2018-10-11 16:21:25

Sapiem
Member
Registered: 2017-12-08
Posts: 62

Re: How open a sqlite database in android using MORMot + Delphi Berlin

I need any way that let me open my sqlite database encrypted with mORMot in Delphi, in Android. I use Android Studio.

I tried Delphi Berlin, but I can't use mORMot to open a local database in device.

Offline

#7 2018-10-11 21:13:46

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: How open a sqlite database in android using MORMot + Delphi Berlin

It is not supported.

Offline

#8 2018-10-11 23:06:00

Sapiem
Member
Registered: 2017-12-08
Posts: 62

Re: How open a sqlite database in android using MORMot + Delphi Berlin

What a pity !

What do you think about Cipher?

And if I use your sqlite.c (from mORMot folder) and replace the inside on SQLite_Android_Bindings.zip distribution from SEE sqlite.org? Maybe I'll obtain the appropriated aar file

I'm new on this, sorry...

Last edited by Sapiem (2018-10-12 02:41:19)

Offline

#9 2018-10-12 07:46:27

Leslie7
Member
Registered: 2015-06-25
Posts: 248

Re: How open a sqlite database in android using MORMot + Delphi Berlin

Sapiem,

Lazus + LAMW + moRMot can be an option. LAMW makes it possible to use the same native Android controls to build the UI you would use in Android Studio. Lack of debugging is a big difference though.

Last edited by Leslie7 (2018-10-12 07:46:54)

Offline

#10 2018-10-12 11:02:41

Sapiem
Member
Registered: 2017-12-08
Posts: 62

Re: How open a sqlite database in android using MORMot + Delphi Berlin

I'll try, thanks...

Offline

#11 2018-10-12 11:39:36

Leslie7
Member
Registered: 2015-06-25
Posts: 248

Re: How open a sqlite database in android using MORMot + Delphi Berlin

This may help to get started:

https://github.com/newpascal/fpcupdeluxe/releases

https://github.com/jmpessoa/lazandroidmodulewizard

Last edited by Leslie7 (2018-10-12 11:40:21)

Offline

#12 2018-10-12 18:04:09

Sapiem
Member
Registered: 2017-12-08
Posts: 62

Re: How open a sqlite database in android using MORMot + Delphi Berlin

Thanks a lot

Offline

Board footer

Powered by FluxBB