Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
Case StudyDelphiDeveloper InterviewsRAD StudioShowcase

This Excellent Cross-Platform Delphi App Has 6500+ Mobile App Store Downloads

This Excellent Cross Platform Delphi App Has 6500+ Mobile App Store Downloads

During webinars I like to demonstrate how powerful RAD Studio with Delphi is for creating cross platform apps and how absolutely easy it is to do. I often make the point that I don’t want to work too hard which is why I like RAD Studio with Delphi – it does all the hard work for me and makes me look great! I get up every day and write code – and I write that code in the Delphi language. RAD Studio is my craftsman’s toolkit and makes me extremely productive.

There are always a couple of skeptical people during the webinar Q & As who ask for “examples of real apps written in Delphi” as if I’m somehow perpetrating a kind of massive magic trick or skullduggery. I’ll say this again; Delphi apps are everywhere, and they are very good at just chugging along, working flawlessly and without drama in all sorts of situations. Robustness and backward compatibility are part of the mantra for the Delphi RTL.

Our Enterprise Article Series has been full of stories from genuine developers who also turn to RAD Studio Delphi and C++ Builder for their software development. Today I have an article written by Gustavo Valle Mascarenhas who is based in Brazil. Gustavo’s article arrived written entirely in Brazilian Portuguese and describes his Acreprev cross-platform mobile app which has over 6500 downloads on Android Play and the Apple iOS app stores.

To be fair, I don’t remember us saying the articles had to be written in English so I used Google to auto-translate the article into English and then I’ve tidied it up. I would have tried using ChatGPT to do the job for me but I suspect it would have provided us with a retelling of a Shakespeare’s Tempest written in the style of Douglas Adams or something equally creative; plausible, but ultimately a little flawed.

Anyway, here’s Gustavo’s Enterprise Article. I have included the original Portuguese text at the end for those who understand the language.

This Excellent Cross Platform Delphi App Has 6500+ Mobile App Store Downloads the Acreprev app store listing

What is the Acreprev app?

In this article we will address the functionalities and embedded technologies of the “acreprev” application whose development was all carried out with the powerful Delphi Enterprise tool in its version 11.1. This application belongs to the Instituto de Previdência do Estado do Acre – ACREPREVIDÊNCIA, a founding autarchy of the Government of the State of Acre.

This Excellent Cross Platform Delphi App Has 6500+ Mobile App Store Downloads two screens

What does the Acreprev app do?

With the aim of carrying out proof of life for retirees and pensioners in the State of Acre, the construction of a solution was idealized that could effectively attest that the beneficiary is alive. It is important that we open a gap to point out that this entire process was previously carried out in person, so, due to the pandemic that hit us, we were forced to create new alternatives to guarantee the safety of our beneficiaries. It was with this in mind that we idealized the creation of a mobile application that would bring mobility and portability within everyone’s reach.

Choosing RAD Studio With Delphi Allowed Us To Use One Team To Do Everything

To bring this sketch to reality, as mentioned above, we used the Delphi Enterprise IDE, a cross-platform tool capable of generating binaries for both Android and iOS operating systems. In this way, we were able to reduce costs with leveling the technical team, that is, we would not need two teams (Android/IOS) on the front line of development, as well as reducing time in application production. It is noteworthy to observe above some of the benefits that this tool has brought to our corporate environment, we will discuss each one of them in detail later.

When was the Acreprev App first developed?

The acreprev app was launched in 2021 in the App Store – https://apps.apple.com/br/app/acreprev/id1610749146, having over 1,500 downloads and in the Google Play store (https:/ /play.google.com/store/apps/details?id=ac.gov.br.ACREPREV&hl=pt_BR&gl=US), with more than 5,000 downloads.

What does the Acreprev Cross-Platform App do?

As previously mentioned, it allows retirees and pensioners to prove their lives [establish they are genuine claimants and have not passed away – IanB], which must be done annually in the month of their birthday.

Its usability is very simple, the beneficiary performs a simple registration informing CPF and functional registration, later informs a valid cell phone, which must be validated by receiving an SMS with a four-digit code, it is worth mentioning that this registration is only for those who have not registered on our site. After this step, the beneficiary must read and accept the terms of the privacy policy.

This Excellent Cross Platform Delphi App Has 6500+ Mobile App Store Downloads three screens

Finally, it comes to the main stage, which is sending the photographs using the cell phone camera. In the first step, you must send two photos, the front and back of your official photo document. In the second stage, you must take a “selfie” holding the aforementioned document below your chin, not using utensils such as glasses, caps, hats or any other that may mischaracterize the photo of the document, and that’s it, the process has come to an end proof of life. Now the photos sent will be analyzed by the ACREPREVIDÊNCIA servers, which will attest to the authenticity of the data sent by crossing it with a reliable database. The result of this analysis will be communicated via SMS (text message) and via push notification on the App. Once the superficial approach of the operation of the application is done, we will go deeper into the technologies implemented thanks to the Delphi tool.

What made you choose RAD Studio with Delphi for your cross-platform apps?

As already mentioned, Delphi is a cross-platform IDE, that is, just one code for several platforms on the market. In our conceptual model, the “acreprev” application is the client, this project is entirely object-oriented, observing the MVC protocol (Model – View – Controller) that performs HTTP requests carrying all the information, including the images of the documents and the selfie in format JSON using the REST protocol.

It is important to emphasize the major bottleneck that was traveling images in JSON format, but that was easily remedied with Delphi using the TMemoryStream class inherited from System.classes. All HTTP requests are implemented using the Thread’s concept, more specifically AnoynmousThread which inherits from the TThread class, a powerful Delphi resource to implement the multi-tasking concept. of JSON objects (TJSONObject) with REST protocol applicability.

This Excellent Cross Platform Delphi App Has 6500+ Mobile App Store Downloads validating the user

We can cite some of the features developed in the application, such as opening a communication/support channel for making calls from within the application to external applications for exchanging text messages, such as WhatsApp. All this was implemented using Intent’s through the TJIntent class for Android and making a direct call using the following line of code in IOS: SharedApplication.OpenURL.

We also implemented the push notification service, through the TPushService class, through the Google FireBase service, thus managing to notify beneficiaries of the status of their proof of life, which can be approved or rejected.

What back-end or server-side technology did you use in your cross-platform apps?

We’ve covered the client side (App), now we’ll talk about the application responsible for receiving the Request’s, processing them, persisting them in the database and sending us the Response of this request, I’m talking about a REST JSON API. In general terms, it is the application responsible for receiving HTTP GET/POST requests containing an object of the TJSONObject type, processing them and persisting the data in the Postgres database, with an object of the TJSONObject type as Response for the Application.

This Excellent Cross Platform Delphi App Has 6500+ Mobile App Store Downloads FireDAC Universal Database Connectivity
This Excellent Cross Platform Delphi App Has 6500+ Mobile App Store Downloads the Delphi log

We can talk about the powerful set of components we use for data persistence, called FireDAC. Through it we can communicate with the most current databases on the market. Its range of components and embedded technologies make it the best and most practical data persistence and query tool.

Finally, through the Delphi Enterprise IDE, in this project, we can easily access physical resources, such as the mobile device camera, access the photo album and perform push notifications, these are just some of the features implemented in our project. It is clear that for any corporation that wants to develop mobile applications for multiplatform apps, using only a single code base, and that aims to develop application programming interfaces with current standards, such as REST, the Delphi IDE is certainly the best and the most consolidated tool on the market for this purpose.


Here is the original Brazilian Portuguese text of the article

Neste artigo iremos abordar as funcionalidades e as tecnologias embarcadas do aplicativo “acreprev” cujo seu desenvolvimento foi todo realizado com a poderosa ferramenta Delphi Enterprise na sua versão 11.1. Este aplicativo é pertencente ao Instituto de Previdência do Estado do Acre – ACREPREVIDÊNCIA, uma autarquia fundacional do Governo do Estado do Acre.
Com o objeto de realizar a prova de vida dos aposentados e pensionistas do Estado do Acre, foi idealizado a construção de uma solução que pudesse efetivamente atestar que o beneficiário está em vida. É importante abrirmos uma lacuna para salientar que todo esse processo anteriormente era realizado presencialmente, logo, em virtude da pandemia que nos assolou, fomos forçados a criar novas alternativas para garantir a segurança dos nossos beneficiários. Foi pensando nisso, que idealizamos a criação de um aplicativo mobile que trouxesse a mobilidade e portabilidade ao alcance de todos.
Para trazer esse esboço para a realidade, como já supracitado acima, utilizamos a IDE Delphi Enterprise, ferramenta esta, multiplataforma, capaz de gerar binários tanto para sistemas operacionais Android quanto para iOS. Dessa maneira, pudemos reduzir custos com nivelamento da equipe técnica, ou seja, não precisaríamos de duas equipes (Android/IOS) na linha de frente de desenvolvimento, assim como conseguimos reduzir tempo na produção do aplicativo. É notório observar acima alguns dos benefícios que esta ferramenta trouxe para o nosso ambiente corporativo, adiante iremos abordar em detalhes cada um deles.
O aplicativo acreprev foi lançado no ano de 2021 nas lojas da App Store tendo nesse período mais de 1.500 downloads e na loja da Google Play, possuindo mais de 5.000 downloads. Como dito anteriormente ele possibilita a prova de vida de aposentados e pensionistas, cuja mesma deve ser realizada anualmente no mês do seu aniversário. Sua usabilidade é bem simples, o beneficiário realiza um simples cadastro informando CPF e matrícula funcional, posteriormente informa um celular válido, cujo mesmo deve ser validado com o recebimento de um SMS com um código de quatro dígitos, vale ressaltar que esse cadastro é apenas para aqueles que não possuem cadastro em nosso site. Após esse passo, o beneficiário deve lê e aceitar os termos de política de privacidade. Por fim chega na etapa principal que é o envio das fotografias com o uso da câmera do celular. Na primeira etapa deve-se encaminhar duas fotos, sendo elas frente e verso do seu documento oficial com foto. Já na segunda etapa deve-se retirar uma “selfie” segurando o documento supracitado abaixo do seu queixo, não utilizando utensílios como óculos, bonés, chapéus ou qualquer outro que venha a descaracterizar da foto do documento, e pronto, chegou ao fim o processo de prova de vida. Agora as fotos enviadas serão analisadas pelos servidores do ACREPREVIDÊNCIA, que irão atestar a autenticidade dos dados enviados realizando cruzamento com uma base de dados confiável. O resultado dessa análise será comunicado via SMS (mensagem de texto) e por meio de notificação push no App. Feito a abordagem superficial do funcionamento do aplicativo vamos aprofundar nas tecnologias implementadas graças a ferramenta Delphi.
Como já dito, Delphi é uma IDE multiplataforma, ou seja, apenas um código para diversas plataformas existentes no mercado. No nosso modelo conceitual o aplicativo “acreprev” é o cliente, projeto este, todo orientado a objetos, observado o protocolo MVC (Model – View – Controller) que realiza requisições HTTP trafegando todas as informações incluindo as imagens dos documentos e a selfie em formato JSON utilizando o protocolo REST. É importante frisar o grande gargalo que foi trafegar imagens em formato JSON, mas que foi facilmente sanado com o Delphi utilizando a classe TMemoryStream herdado de System.classes. Todas as requisições HTTP são implementadas utilizando o conceito de Thread’s, mais especificamente AnoynmounsThread que herda da classe TThread, poderoso recurso do Delphi para implementar o conceito de multi-tarefas. Essas requisições foram implementadas utilizando os componentes nativos do Delphi, que seguem: TRESTClient, TRESTResponse, TRESTRequest, por meio deles podemos realizar GET/POST de objetos JSON (TJSONObject) com aplicabilidade do protocolo REST.
Podemos citar alguns dos recursos elaborados no aplicativo, como por exemplo abertura de um canal de comunicação/suporte para realização de chamadas de dentro do aplicativo para aplicativos externos de troca de mensagem de texto, como por exemplo o WhatsApp. Tudo isso foi implementado utilizando Intent’s por meio da classe TJIntent para Android e realizando chamada direta utilizando a seguinte linha de código no IOS: SharedApplication.OpenURL. Implementamos também o serviço de notificação push, através da classe TPushService, por meio do serviço da Google FireBase, conseguindo assim, notificar os beneficiários do status da sua prova de vida, podendo ela ser aprovada ou recusada.
Abordamos o lado do client (App), agora falaremos sobre a aplicação responsável por receber os Request’s, processa-los, persisti-los no banco de dados e nos enviar o Response desta requisição, estou falando de uma API REST JSON. Em linhas gerais, é a aplicação responsável por receber as requisições HTTP GET/POST contendo um objeto do tipo TJSONObject, processa-las e realizar a persistência dos dados no banco de dados Postgres, tendo como Response para o Aplicativo também um objeto do tipo TJSONObject. Podemos abrir parênteses para falar sobre o poderoso conjunto de componentes que utilizamos para persistência de dados, chamado FIREDAC. Por meio dele podemos nos comunicar com os mais atuais banco de dados existentes no mercado. Sua gama de componentes e tecnologias embarcadas, o faz a melhor e mais prática ferramenta de persistência e consulta de dados.
Por fim, através da IDE Delphi Enterprise, neste projeto, conseguimos facilmente acessar recursos físicos, como por exemplo a câmera do dispositivo mobile, acessar o álbum de fotos e realizar notificações push, esses são apenas alguns dos recursos implementados no nosso projeto. Fica claro, que para toda e qualquer corporação que deseje desenvolver aplicativos mobile para multiplataformas, utilizando apenas um único código, e que almeje desenvolver interfaces de programação de aplicação com padrões da atualidade, como por exemplo REST, a IDE Delphi com certeza é a melhor e mais consolidada ferramenta do mercado para este propósito.


This article was submitted as part of our Enterprise Article Showcase. If you have a success story to tell about a project which makes use of RAD Studio with Delphi or C++ Builder, or any of our other great enterprise products please get in touch. Read all about it here: Enterprise Article Showcase


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

About author

Ian is the Embarcadero Developer Advocate, a professional writer, presenter, and host. He is a prolific software developer, voice actor, designer and poet. Ian is British American, born in London, now living in Dallas, Texas. "I get up early every day and write code".

1 Comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES