Category: Firemonkey

I need a programme to run on android <= 4 [closed]

I have a firemonkey programme which was written back for Android 3 or 4, which has grown up to be running happily on Android 9. Unfortunately someone wants to run it on Android 5. It shows the "Splash" screen, blinks its little (Samsung) location indicator at the top of the screen s few times, then dies. Is this likely to be fixed on going back to an earlier Android library please? And if so, which one?
Read More

What the purpose of the System.StartUpCopy included in all firemonkey project?

When I create a new mobile app with Delphi, I have this dpr source: program Project1; uses System.StartUpCopy, FMX.Forms, Unit1 in 'Unit1.pas' {Form1}; {$R *.res} begin Application.Initialize; Application.CreateForm(TForm1, Form1); Application.Run; end. I do not understand, what the purpose of the System.StartUpCopy in the use? With System.StartUpCopy.pas, on ios, it's look like the app will copy file from /private/var/containers/Bundle/Application/2BE5407C-4DD9-5A08-110F-C12510C42BF3/myapp.app/StartUp/Documents/ to /private/var/mobile/Containers/Data/Application/2BE5407C-4DD9-5A08-110F-C12510C42BF3/Documents/ but I don't fully understand why because now my app will use twice more disk space, and my app can access both directories so I do not understand why we need to duplicate the resources :(
Read More

Delphi Android開発にOpenJDKを使用する

このことは意外に知られていないかもしれませんが、Javaは多くのフレーバーとパーツから構成されています。OracleによるSun Microsystemsの買収によりOracleはJava商標の正式な所有者となり、主要な「公式」Javaディストリビューションとなりました。 最初に免責事項を説明します:私(Jim McKeeth)は弁護士ではなく、Java開発者でもありません。この記事はJava、Java開発、およびライセンスに関連する多くの複雑な問題に関するハイレベルな概要です。この記事の目的...(read more)
Read More

TMS XData in a COVID-19 app: comments from the developer

Photo by National Cancer Institute on Unsplash

Stephen Ball has recently posted about a new app released by the

Military Institute of Medicine
that is
helping fight the spread of the global SARS-CoV-2 pandemic
.

Stephen’s blog post describes with more details what the application is about,
so here I will mention how TMS XData – our framework to build multitier REST/JSON applications – helped the team to accomplish it.

The project is headed by Piotr Murawski (Ph.D, Head of ICT, Military Institute of Medicine, Warsaw, Poland) who shared with me
some more interesting information in the (kind of) format of an interview. Thus I’m providing the content more or less how I asked him.
I hope you enjoy it!

Q: Do you have interesting screenshots of the software?
A: I attached them, two from mobile application (Android), one form Epidemilogist’s panel and one from a Windows Services.

Q: Do you have any idea of how many users are using the software?
A: Until today the software has been used by 1515 users from hospital and others institution.
These users send 18031 results of Medical Self-monitoring Card. Each card have 8 questions and four are connected with COVID-19.

Q: Do you have any idea of the number of requests per day (or hour, or minute)?
A: As You can expect there is not a statistical even distribution. In reality it is connected with the hours when people start or
finish they job.

This is a long term distribution (until today), where the first registration was 15.03.2020.
As You can see a the beginning was “test time” and the peaks are as Monday to Friday, which is understandable.

Q: Is the remote (cloud) communication only done with XData, or are there other frameworks/communication involved?
A: The remote connection is done only with XData for REST Services.

Q: Is the XData server a single one, or load balanced?
A: At the moment we use single instance of XData server but probably we will use load balancer for it in the future –
an increase in the number of users is planned.
As you can guess infrastructure and software architecture was designed to get as short answer time as possible.
This is why some task has been done by the SQL Server procedures or triggers to.

Piotr kindly provided additional information:



The infrastructure modules have a roles:

  • Covid Analytics Service: The analyse answers individually for every persons and qualified the answers to the group:
    white, yellow, red, dark red for an intervention;
  • Covid Core Service: authorization, result sending, user registration;
  • Covid Database Service: Database (TMS RemoteDB and TMS Aurelius – two versions) for an application for Epidemiologist
    to be possible analyze a data not only in a Institute but at home or other place too;
  • Covid External Service: Connection to the medical laboratory. If they get a positive result the lab can automatically
    create a record for a monitoring.
  • Covid Messaging Service: SMS reminder, for every person it is possible to set a different time between card what is expected.
    This service check this delay and if is greater than expected send a SMS by use of Microsoft Exchange and VoIP/SMS gateway.
    The messages are send from Moday to Friday from 7am to 9 pm every 2 hours, so it is motivated to send a card.
  • Application’s works on:

    • For patients and other persons: Windows, Android (8.0 and higer), Mac OS, iOS. Because I still have a problem to put them to the
      Apple Store and Google Play there ae available from the Institute’s cloud;
    • For Epidemilogy Department: Windows;
    • Infrastructure: webservices and some servers for test and service debugging.

    If we will think about productivity there was impossible to do without TMS Software.
    As you can see in the table the system cost 129 hours one man programming with help of UI Specialist and Medical doctor.

    I cannot thank Piotr enough, first for creating such a nice application that is helping in all this crazy times we’re living,
    but also in providing such detailed information about his software, and ending with such nice compliments.

    It makes us proud to what have done so far and give us confidence and energy to keep moving on and helping people all around the world
    to be productive and accomplish their missions!

    Read More

    Read More

    TMS WEB Core for Visual Studio Code beta is ready for TMS ALL-ACCESS users

     
    With this new step and announcement, we’re excited to have reached a new milestone in the vision of TMS WEB Core.

    On July 26, 2018, we released the first version of TMS WEB Core for the Delphi IDE, hereby offering a RADically new way for creating web applications directly from the Delphi IDE. RADically different because TMS WEB Core offers RAD component based rich web client application development thanks to the technology of compiling the Object Pascal code to JavaScript with the pas2js compiler. A next step was to also enable using TMS WEB Core from the Lazarus IDE with a first version introduced in October 2018. At the same time, TMS WEB Core was extended with support for creating PWA’s, that is progressive web applications, meaning web applications that can be installed on mobile devices or Chrome desktop browsers, run offline and access several parts of the device hardware. In a later step, February 2019, we announced support for creating cross-platform desktop applications via the Electron framework. On November 15, 2019 we unveiled that TMS WEB Core was also coming to Visual Studio Code. And now, today, after a huge amount of intensive work, we feel confident to give our baby in the hands of TMS ALL-ACCESS users.
    It took more time than expected to reach this level as the challenges turned out to be quite complex. Challenges we couldn’t have coped with without having the absolute best engineers on board. In the first place, José Leon Serna, architect of the IDE integration into Visual Studio Code, Roman Kassebaum overlooking and ensuring the Visual Studio Code integration works on 3 operating systems and remains compatible with Delphi’s project management, the pas2js compiler team assisting with debugging integration, the framework team itself taking up the huge task for making the UI controls all design-time editable.

    Let’s go back to the WHY of taking up this huge & challenging task. Before embarking on this project, José Leon Serna, former Embarcadero IDE architect and head of the engineering team in Spain, and myself mutually shared the vision that Visual Studio Code offered a couple of unique technical features that could potentially make it an ideal candidate for using it for TMS WEB Core web client development. Visual Studio Code is based on web technology. Visual Studio Code is an Electron application and internally, everything is rendered via web views. This makes it ideal to offer design-time live rendering of the forms designed by TMS WEB Core. This is the primary driver. But there are nice additional benefits coming with Visual Studio Code. So, in a nutshell, key decision factors for our endeavour were:

    • Based on web technology, offers a live web rendered designer form
    • Is cross-platform, Visual Studio Code can be used on Windows, macOS, Linux
    • Designed to be extended via plugins with seamless plugin ‘marketplace’ distribution
    • A powerful established Pascal code editing plugin OmniPascal is already available
    • It is a high-DPI compliant IDE
    • Features built-in mechanisms for debugging of applications running in a browser
    • It features side-by-side editing, multi-view code editor windows that can be freely arranged
    • It has a very low barrier of entry, as Visual Studio Code itself is free and open source

    Just like our support for Lazarus adds a freedom of choice, the capability to use Visual Studio Code now is an extra freedom of choice. Of course, this won’t stop nor influence our plans for TMS WEB Core for Delphi. Version 1.4 of TMS WEB Core for Delphi is around the corner. All the work we did on the framework to make it behave nicely live in the Visual Studio Code designer benefits the quality of the framework itself, so also users with the Delphi IDE. And of course, Delphi remains the powerhouse for building fast native backend solutions for Windows or Linux servers with solutions such as TMS XData, Embarcadero RAD Server or other commercial & open-source initiatives for creating server software. We actually hope in fact that it helps bringing Object Pascal in the spotlights of Visual Studio Code users and makes developers curious for exploring and using RAD Studio as well.

    So, we hope for a fruitful beta period with our baby in the hands of TMS ALL-ACCESS users. We will meanwhile work extremely hard to polish the product so we can reach the release stage within a couple of months. Regardless, we always keep the words from David I (@davidi99) in mind, we’ll release it “when it’s ready!”

    Read More

    Read More

    What’s the best approach in showing multiple images from Database using TVertScrollBox with 2 columns

    I am contemplating on showing number of images using TVertScrollBox with 2 columns and text at the bottom of each images.

    Here’s the screenshot of what I wanted to do:

    I am thinking of using the TGridLayout and create visual controls l… … Read More

    Read More

    Can I add a second component editor to a component in Firemonkey?

    Delphi IDE has a component editor for TLang component (Language Designer) I wrote a custom component editor to TLang, to help with localization tasks. I registered it in a design time package. RegisterComponentEditor(TLang, TMyLangComponentEditor); This works. Now when I dbl-click the component, I get my flashy component editor. But it hides the original TLang editor. How can I have access to both editors in the right-click menu ? ex: In my component editor I have: function TMyLangComponentEditor.GetVerb(Index: Integer): string; begin case Index of 0: Result := '&Show IDE Lang Designer'; 1: Result := '&Show My Lang Editor'; else raise ENotImplemented.Create('verb not supported'); end; end; procedure TMyLangComponentEditor.ExecuteVerb(Index: Integer); begin case Index of 0: ; // <--- what goes here to open the IDE Language designer ? 1: ShowMyLangForm; else raise ENotImplemented.Create('verb not supported.'); end; end; I'm afraid that, by registering a new component editor, the old one got lost...
    Read More

    In FMX how to get the current URL of a TWebBrowser control?

    I use Delphi 10.3 Community edition. My FireMonkey Android/iOS application has a tab with TWebBrowser control, so users can load and browse the sites from the bookmarked list. When a user clicks on any link (for example, a category, a new product item or a new site) in the already loaded site, the new link is also loaded into the TWebBrowser. How to programmatically determine this new link that the user have just clicked on? Or how to programmatically determine the link of the currently loaded document in the TWebBrowser? That is easy to do for Windows applications, but for mobile applications the TWebBrowser component has very limited functionality. For example: I load first url to TWebBrowser: WebBrowser1.URL := 'site.com' I browse this site and click on a new link site.com/category1 to see category1 page in the same TWebBrowser. After that I try to get current WebBrowser1 document url like this: Label1.Caption := WebBrowser1.URL but Label1.Caption is equal site.com, although it should be site.com/category1. To define a new URL, I used different events like OnDidFinishLoad (starts many times), OnDidStartLoad (starts many times), OnShouldStartLoadWithRequest (never started) end even TButton.Onclick after new link is loaded. But I still couldn’t programmatically get the link site.com/category1.
    Read More