You are not logged in.
Pages: 1
For anybody interested in running the mORMot on your Android phone.
https://github.com/LongDirtyAnimAlf/fpc … -debug.apk
This is TestSQL3 designed to run on Android through OpenGLES.
Its for armv7, so should run on any phone.
Enjoy. Feedback welcome as ever.
Offline
On my phone, I have 76 failures. Of which 74 similar from one test.
Last edited by AOG (2020-04-27 20:16:48)
Offline
Solved the remaining issues.
New uploaded (see link) apk now gives all greens on my phone.
Edit:
This apk was created with FPC (and Lazarus). Not a single line of java was needed. Its a pure native Android app, written in Pascal.
Last edited by AOG (2020-04-28 06:53:02)
Offline
Uploaded universal apk. It has armv7 and arm64. This is needed for the app-store.
Offline
all tests passed !!! Congratulations AOG !!!
Can you suggest me tutorials for Android development with Lazarus/FPC ? I know that there is someones in the net, but I don't know the more reliable.
Thanks.
Esteban
Offline
Very Cool!!! All test passed ... and like Esteban, I would also appreciate a reference to a tutorial ... Congratulations AOG!
Offline
iOS also fully functional?
Offline
I am a bit busy the next couple of days. But I will publish all.
In general, the LAMW framework can be used to make Android apps based on Java.
The Castle Game Engine can be used for iOS apps.
For this test however, I have used the Asphyre PXL framework.
Will update on its use.
Last edited by AOG (2020-04-28 18:28:25)
Offline
Sources are uploaded. They contain a special version of the mORMot.
https://github.com/LongDirtyAnimAlf/AsphyrePXL
Tha latest (pre-) release of fpcupdeluxe can install these sources AND perform some magic to set all path correct.
https://github.com/LongDirtyAnimAlf/fpc … tag/1.6.8o
Edit:
The module name to install/use is "mORMotPXL".
Last edited by AOG (2020-05-03 07:51:49)
Offline
Thank you @AOG !!! I'll investigate. One question: is needed asphyre for non graphical apps ?
Esteban
Offline
This is a pure Pascal native Android app. No Java, so no easy views. That is why I used Asphyre and GLES.
With normal Java, you can create views and more easily.
But for testing, this was the most easy way to do.
For all the rest, I would advice LAMW.
Offline
Ok, thank you very much.
Esteban
Offline
This is a pure Pascal native Android app.
Can I use sqlite-db-acces from mORMot as Android-library(.so, .a) or iOS .dylib linked to FMX project?
For example a subset of main database will be downloaded from server to local device to speed up things, so the most used tabled are in place and acts as a cache.
I can use the same code(partially) on the main server and also on the local device - FMX (views) and shared library (data access and logic).
Offline
FMX is supported only for the client side (SynCrossPlatform* units), not the server/data side (SynCommons/mORMot/SynSQLite3).
So a FMX project won't be able to use the mORMot SQlite3 features.
Whereas with FPC, it will work, as the Alfred sample shows.
Offline
FMX is supported only for the client side (SynCrossPlatform* units), not the server/data side (SynCommons/mORMot/SynSQLite3).
So a FMX project won't be able to use the mORMot SQlite3 features.Whereas with FPC, it will work, as the Alfred sample shows.
That's what I wanted to say: mORMot+FPC packed in shared library. This library can be used by a FMX project.
Last edited by emk (2020-05-04 12:27:46)
Offline
@emk
Ah! Make sense now!
I guess we may more easily add Delphi new targets in mORMot2.
In plain mORMot, it could be difficult to add Delphi iOS, Android or Linux support.
But in mORMot2, all Operating System calls are defined in a single unit named https://github.com/synopse/mORMot2/blob … ore.os.pas
So we may be able to add Delphi multi-target support easier.
Offline
Hi Ab,
I was looking at the mORMot2 code you posted above.
Regarding mORMot and testing on different platform, I would like to ask you a favor.
To get TestSQL3 running on Android, I needed to catch the output to console (STD).
Normally, Android has no (visible) console.
In mORMot1, TestSQL3, you use a text to write towards console.
I would like to ask you to make this a variable (global or setable) text to be able to catch it. Can be a file, can be a stringlist-redirect like I have used for the Android sample. That way, mORMot2 can put its TestSQL3 output (or other console output) in any text, being std by default.
Thanks, Alfred.
Offline
That is good ! Thank you !!
Offline
Ah! Make sense now!
mORMot+FPC can act as fast "local server" ("so" library or "dylib") on mobile device. The first use case I wait to test sqlite-access+custom-AES-encryption.
Exchange of data between FMX-project and "local server" can be made as JSON. Practically you can have on your mobile a replica(subset or integrally) of the main database from cloud-server but sharing the same code (AES, pascal stored procedures, etc)
I guess we may more easily add Delphi new targets in mORMot2.
Perfect! Because I see a real push from ARM servers.
Last edited by emk (2020-05-04 17:05:17)
Offline
@emk.
This issue has been discussed more often on this list: the need for offline (but encrypted) functionality on mobile.
I would be very interested in an automagical (user transparent) scheme to have offline changes uploaded to online and an auto-switch-over from off- to on- to off- with updates and encrypted local storage.
Offline
Interesting work.
i would like to test it on RS 10.4 do you think it will work ?
Last edited by itSDS (2020-05-13 10:54:44)
Rad Studio 12.1 Santorini
Offline
https://www.google.com/search?q=RS+10.4
What is RS 10.4 ... |-) ... ?
Offline
RS 10.4 = Rad Studio 10.4 = upcoming Delphi 10.4.
And to answer the question.
It won't work with Delphi Android. Only FPC Android is supported for server side.
But you can generate client code for Delphi Android, even in older revisions.
Offline
Pages: 1