Kastri

2025-12-10 0 528

Kastri

From Delphi Worlds

Compatible with Embarcadero Delphi. Please note: Only the last two major releases (e.g. at present that includes Delphi 12.x and Delphi 11.x) are \”officially\” supported.

Development of Kastri can be helped along with Github Sponsorship, so please consider sponsoring today!

Alternatively, you might like to make a donation via Stripe*:

or Paypal:

or via Lightning Wallet:

Please star this repo by clicking the Star box in the top right corner if you find it useful!

If you\’re looking to learn Delphi, please visit this link

Kastri

  • Is a cross-platform library which builds upon the existing RTL, FMX and VCL libraries in Delphi
  • Supports a number of newer APIs that you won\’t find in FMX/RTL, and \”backfills\” for missing APIs
  • Is structured in a way so as to avoid creating unnecessary dependencies
  • Follows strict coding standards to ensure consistency and readability
  • Is kept as simple as practicable
  • Is named after the place in Greece where Delphi once stood

Playground

Playground is a separate repository that serves as a testing ground for features that may or may not be included in Kastri. Please visit the Playground for features/demos that are on the bleeding edge!

Delphi 11/12 changes

With the introduction of Delphi 11 and Delphi 12, there have been some changes related to Android. You may notice new jar files in the Lib folder where the name is the same as an existing jar, with a suffix of 2.0.0 or 3.0.0 e.g. dw-kastri-base-3.0.0.jar. Jars with a 2.0.0 suffix will work only with Delphi 11, and those with a suffix of 3.0.0 will work only with Delphi 12. If a jar does not have a corresponding jar with a 2.0.0 or 3.0.0 suffix, it should also work with Delphi 11 or Delphi 12. Please also see the Demos section below.

Due to the above changes to Delphi 11 and Delphi 12, the existing demos that were created with Delphi 10.4 or Delphi 11 when using them with a later version of Delphi may require the Android Libraries fix

Intro video

This is a link to an intro video for Kastri

How To Use Kastri

For the most part, with Kastri there are no components to install. Simply clone the repo (Fork is a highly recommended Git client), or download/unzip and ensure that your Project (recommended) or IDE paths point to the folders of the units that you use.

The Native Controls suite (Kastri FMX) is a set of components that can be installed into Delphi and used at design-time

Pull Requests

Pull requests are welcome, however before making any, please read the Coding Standards readme and ensure that the change adheres to the standards, and that the Description section of the request is filled out, noting the purpose and reasoning for the change.

In regards to coding standards, in particular observe things like naming, ensuring fields/methods are kept in alphabetical order (which makes them easier to find as the number of methods grow), and that structured statements follow the standard.

Support

News/Features

Regular posts will appear on X (Twitter), about updates to Kastri and other repos, and news about what I\’m working on, so please follow!

Issues page

If you encounter an issue, or want to request an enhancement, please visit the issues page to report it.

Slack Channel

The Delphi Worlds Slack workspace has a channel (#kastri) devoted to discussing Kastri. There you will find Dave Nottage (when he is available) and other developers who are passionate about Kastri to discuss how to use Kastri, what is in it etc.

Sponsors of Kastri can receive priority support via the Slack workspace, and/or via email.

If you would like to join the Delphi Worlds Slack workspace, please visit this self-invite link

What Is In Kastri?

Demos

You\’ll find demo applications in the Demos folder, including those associated with articles posted on the Delphi Worlds blog

Note: Most demos have a readme associated with them, and they may have vital configuration information that should be applied when using the feature(s) in your own projects

Delphi 11/12 users please note: Some of the demos that have Android support have been updated in line with changes in Delphi 11/12, and now have separate project (.dproj) and group project (.groupproj) (where applicable) files, which have been suffixed with D11 and D12. For demos that do not have a suffix in the name, you may need to open Project Manager and for each Android target you wish to use, right-click the Libraries node and click Revery System Files to Default before building the project.

API imports

In the API folder you will find imports for a number of iOS, macOS, Android and Linux APIs that are either not included with Delphi, serve to complete missing APIs, or are imports for Java code contained in Kastri.
Most of these are used in the Kastri Features and/or demos however some are included due to interest from developers.

Core units

Units in the Core folder contain code of a wealth of cross-platform related implementations. Units that have platform specific code are suffixed with one of:

  • .Android.pas
  • .iOS.pas
  • .Linux.pas
  • .Mac.pas – can be for both iOS and macOS
  • .Posix.pas – for Posix-based platforms (iOS, macOS, Android, Linux)
  • .Win.pas

Implementations include (but are not limited to):

  • DW.OSLog – logging code that serves to replace Log.d, which relies on FMX, and cannot be used in an Android service
  • DW.OSDevice – code that returns information that is mostly device-specific
  • DW.OSTimer – leaner, less complex implementation of a timer. Also does not rely on FMX, so can be used in an Android service

Features

The Features folder contains more feature-rich cross-platform implementations of APIs. These are structured in such a way so as to shield your cross-platform code from the platform-specific implementation.
There are demos for each of the features in the Demos folder
Features include (amongst others):

AdMob

Support for Google Ads on Android and iOS

AndroidPDF

PDF Renderer for Android

AppReview

In-app invocation of App Review for the relevant app store.

AppUpdate

In-app updating of the application. (Android only)

AudioPlayer

Play audio files on Android, iOS and Windows. Specifically constructed to allow synchronization of audio and visual display.

Barcode

Based on Google ML Vision APIs, it allows you to scan an image and detect barcodes within it

Biometric

Android and iOS implementations of biometric functions, namely: Fingerprint recognition on Android, and Fingerprint and FaceID on iOS

Camera

Android and iOS implementations of native camera support

Connectivity

Android, macOS, iOS and Windows implementations of code for checking network connectivity of a device

Files Selector

Uses native APIs to allow users to select one or more files on the device, for Android and iOS

Firebase

Android and iOS implementations of Firebase Cloud Messaging using their native libraries

Geofencing support on Android

Works a little like the regions support does for iOS with TLocationSensor. Set up geographical regions (each region is a location with a specified radius), and events fire when the user passes in/out of those regions

Google SignIn

Google SignIn impolementation for Android and iOS, however as at June 3rd, 2024 the iOS implementation is yet to be functional.

Location

Android and iOS framework made specifically for location updates when the application is in any state (e.g. even when it is not running)

NFC

Near-Field Communication implementations for Android and iOS

Notifications

Framework that is alternative to TNotificationCenter (that ships with Delphi) for Notifications on Android and iOS

Proximity

Support for the proximity sensor on Android and iOS, including switching the screen on/off e.g. when the user puts the device to their ear

Share Items

A more feature-rich alternative for the Share Sheet implementation provided with Delphi, for Android and iOS

SMS

Support for sending SMS messages on Android and iOS

Sound Player

For playing short sounds such as audio effects in games. Support for Android, iOS and macOS

Speech Recognition

Android and iOS implementations for speech-to-text services. On Android, the actual speech API is used, rather than via Intents

Symbol Scanner

Scanning of codes specifically for popular scanning devices such as Zebra, Symbol and Honeywell (Android)

Text To Speech

Allows your device to speak from the supplied text. Support for Android, iOS, macOS and Windows

Universal Links

Allows users to follow links to content inside your app from your website.

Video Player

Plays video using the latest technologies on the respective platforms, e.g. ExoPlayer on Android. Support for Android and iOS. macOS and Windows support are in development.

Web Browser Ext

Adds and improves functionality of TWebBrowser, such as asynchronous bitmap capture, asynchronous JavaScript execution with results handling, Cookies/Cache clearing, Element click handling, and more!

The above features take time and resources to develop. Your sponsorship can help make more/improved features a reality!

License

Kastri is licensed under MIT, and the license file is included in this folder.

下载源码

通过命令行克隆项目:

git clone https://github.com/DelphiWorlds/Kastri.git

收藏 (0) 打赏

感谢您的支持,我会继续努力的!

打开微信/支付宝扫一扫,即可进行扫码打赏哦,分享从这里开始,精彩与您同在
点赞 (0)

申明:本文由第三方发布,内容仅代表作者观点,与本网站无关。对本文以及其中全部或者部分内容的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。本网发布或转载文章出于传递更多信息之目的,并不意味着赞同其观点或证实其描述,也不代表本网对其真实性负责。

左子网 编程相关 Kastri https://www.zuozi.net/33700.html

mybatis 3
上一篇: mybatis 3
kestra
下一篇: kestra
常见问题
  • 1、自动:拍下后,点击(下载)链接即可下载;2、手动:拍下后,联系卖家发放即可或者联系官方找开发者发货。
查看详情
  • 1、源码默认交易周期:手动发货商品为1-3天,并且用户付款金额将会进入平台担保直到交易完成或者3-7天即可发放,如遇纠纷无限期延长收款金额直至纠纷解决或者退款!;
查看详情
  • 1、描述:源码描述(含标题)与实际源码不一致的(例:货不对板); 2、演示:有演示站时,与实际源码小于95%一致的(但描述中有”不保证完全一样、有变化的可能性”类似显著声明的除外); 3、发货:不发货可无理由退款; 4、安装:免费提供安装服务的源码但卖家不履行的; 5、收费:价格虚标,额外收取其他费用的(但描述中有显著声明或双方交易前有商定的除外); 6、其他:如质量方面的硬性常规问题BUG等。 注:经核实符合上述任一,均支持退款,但卖家予以积极解决问题则除外。
查看详情
  • 1、左子会对双方交易的过程及交易商品的快照进行永久存档,以确保交易的真实、有效、安全! 2、左子无法对如“永久包更新”、“永久技术支持”等类似交易之后的商家承诺做担保,请买家自行鉴别; 3、在源码同时有网站演示与图片演示,且站演与图演不一致时,默认按图演作为纠纷评判依据(特别声明或有商定除外); 4、在没有”无任何正当退款依据”的前提下,商品写有”一旦售出,概不支持退款”等类似的声明,视为无效声明; 5、在未拍下前,双方在QQ上所商定的交易内容,亦可成为纠纷评判依据(商定与描述冲突时,商定为准); 6、因聊天记录可作为纠纷评判依据,故双方联系时,只与对方在左子上所留的QQ、手机号沟通,以防对方不承认自我承诺。 7、虽然交易产生纠纷的几率很小,但一定要保留如聊天记录、手机短信等这样的重要信息,以防产生纠纷时便于左子介入快速处理。
查看详情

相关文章

猜你喜欢
发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务