Jump to content

Search the Community

Showing results for tags 'android'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Delphi Questions and Answers
    • Algorithms, Data Structures and Class Design
    • VCL
    • FMX
    • RTL and Delphi Object Pascal
    • Databases
    • Network, Cloud and Web
    • Windows API
    • Cross-platform
    • Delphi IDE and APIs
    • General Help
    • Delphi Third-Party
  • C++Builder Questions and Answers
    • General Help
  • General Discussions
    • Embarcadero Lounge
    • Tips / Blogs / Tutorials / Videos
    • Job Opportunities / Coder for Hire
    • I made this
  • Software Development
    • Project Planning and -Management
    • Software Testing and Quality Assurance
  • Community
    • Community Management

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Delphi-Version

Found 128 results

  1. my sample based on tip by Fernando Rizzato (MVP Embarcadero lead South America) unit uFormMain; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, System.Permissions, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.Layouts, FMX.Controls.Presentation, FMX.StdCtrls, FMX.ListBox, FMX.Objects, FMX.ScrollBox, FMX.Memo, FMX.Media; type TfrmFormMain = class(TForm) lytFormMain: TLayout; lytFormMainToolBar: TLayout; lytFormMainClientArea: TLayout; tbarFormMainMenu: TToolBar; sbtnCAMStartCamera: TSpeedButton; cmbboxCAMDevices: TComboBox; imgVideoCapture: TImage; mmMyLog: TMemo; sbtnCAMStopCamera: TSpeedButton; procedure FormCreate(Sender: TObject); procedure sbtnCAMStartCameraClick(Sender: TObject); procedure FormClose(Sender: TObject; var Action: TCloseAction); procedure imgVideoCaptureTap(Sender: TObject; const Point: TPointF); procedure sbtnCAMStopCameraClick(Sender: TObject); procedure cmbboxCAMDevicesChange(Sender: TObject); procedure FormResize(Sender: TObject); procedure FormActivate(Sender: TObject); private procedure prcMyLog(lText: string); // procedure prcCAMDevicesSetting; procedure prcCAMStartCapture; // {$IF DEFINED(ANDROID)} procedure prcPermissionsResulted(Sender: TObject; const APermissions: TArray<string>; const AGrantResults: TArray<TPermissionStatus>); procedure prcDisplayRationale(Sender: TObject; const APermissions: TArray<string>; const APostRationaleProc: TProc); {$ENDIF} // procedure prcCAMSampleBufferReady(Sender: TObject; const ATime: TMediaTime); procedure prcCAMSampleBufferSync; public end; var frmFormMain : TfrmFormMain; FFormTopPositionBeforeResize: integer = 0; implementation {$R *.fmx} { This sample, will use the "TVideoCaptureDevice" (class base to "TCameraComponent") directly!!! This class is defined in "FMX.Media.pas" // TDialogService.ShowMessage() used for dont block main-thread! } // uses FMX.DialogService {$IF DEFINED(ANDROID)} , FMX.Helpers.Android, Androidapi.JNI.JavaTypes, Androidapi.Helpers, Androidapi.JNI.OS {$ENDIF} ; // var lMyCAMDevice : TVideoCaptureDevice; lMyCAMPermission: string; function fncMyIIF(lBooleanExpr: boolean; lTextTrue, lTextFalse: string): string; begin result := lTextFalse; // if lBooleanExpr then result := lTextTrue; end; procedure TfrmFormMain.prcMyLog(lText: string); begin mmMyLog.Lines.Add(lText); end; procedure TfrmFormMain.cmbboxCAMDevicesChange(Sender: TObject); begin {$IF NOT DEFINED(ANDROID)} try lMyCAMDevice := nil; // lMyCAMDevice := TVideoCaptureDevice(TCaptureDeviceManager.Current.GetDevicesByName(cmbboxCAMDevices.Selected.Text)); // sbtnCAMStartCamera.Enabled := not(lMyCAMDevice = nil); // except on E: Exception do prcMyLog('Error Start CAM' + #13#10 + E.Message); end; {$ENDIF} end; procedure TfrmFormMain.FormActivate(Sender: TObject); begin {$IF NOT DEFINED(ANDROID)} FFormTopPositionBeforeResize := Self.Top; { when the user move the forms, needs change it too! } {$ENDIF} end; procedure TfrmFormMain.FormClose(Sender: TObject; var Action: TCloseAction); begin if not(lMyCAMDevice = nil) then begin {$IF DEFINED(ANDROID)} // if PermissionsService.IsEveryPermissionGranted([lMyCAMPermission]) then; if PermissionsService.IsPermissionGranted(lMyCAMPermission) then {$ENDIF} begin if (lMyCAMDevice.State = TCaptureDeviceState.Capturing) then lMyCAMDevice.StopCapture; end; // // lMyCAMDevice.Free; // if necessary!!! end; end; procedure TfrmFormMain.FormCreate(Sender: TObject); begin {$IF NOT DEFINED(ANDROID)} FFormTopPositionBeforeResize := Self.Top; {$ENDIF} // // // Form.OnCreate is not better place to "critial" procedure! // Here, only basic procedures! // Self.Position := TFormPosition.ScreenCenter; sbtnCAMStopCamera.Text := 'Stop Cam'; // prcCAMDevicesSetting; // if necessary, move it for another place! // if not(lMyCAMDevice = nil) then begin prcMyLog(lMyCAMDevice.ToString); // unfortunatelly, dont have Name or Description on Mobile Android // sbtnCAMStartCamera.Enabled := True; end else prcMyLog('MyCAMDevice = nil'); end; procedure TfrmFormMain.FormResize(Sender: TObject); begin {$IF NOT DEFINED(ANDROID)} if (Self.Height <= 480) then begin Self.Top := FFormTopPositionBeforeResize; Self.Height := 480; end; // if (Self.Width <= 640) then Self.Width := 640; // to avoid that ComboBox is gone...! {$ENDIF} end; procedure TfrmFormMain.imgVideoCaptureTap(Sender: TObject; const Point: TPointF); {$IF DEFINED(ANDROID)} var lObject: string; {$ENDIF} begin {$IF DEFINED(ANDROID)} // for "TAPing" tests! // lObject := ''; // if not(Sender = nil) then lObject := Sender.ClassName; // TDialogService.ShowMessage( { } Format('Object=%s, Point X=%f, Y=%f, V[0]=%f, V[1]=%f, IsZero=%s', [ { } lObject, Point.X, Point.Y, Point.V[0], Point.V[1], { } fncMyIIF(Point.IsZero, 'is zero', 'is not zero') { } ])); {$ENDIF} end; procedure TfrmFormMain.prcCAMDevicesSetting; {$IF NOT DEFINED(ANDROID)} var DeviceList: TCaptureDeviceList; i : integer; {$ENDIF} begin {$IF DEFINED(ANDROID)} cmbboxCAMDevices.Visible := False; try // Normally, there is only 1 cam in Mobile! // // NOTE: any try to read or change any property from CAM, NEEDS "permissions"!!! lMyCAMDevice := TCaptureDeviceManager.Current.DefaultVideoCaptureDevice; // lMyCAMDevice.OnSampleBufferReady := prcCAMSampleBufferReady; // showing our video on TImage // // DONT TRY READ or CHANGE any property from CAMDevice here!!! // Like: Start or Stop, Quality, IsDefault, etc... // Only later your "permissions" to be given by user!!! except on E: Exception do prcMyLog('Error CAM definition' + #13#10 + E.Message); end; {$ELSE} DeviceList := TCaptureDeviceManager.Current.GetDevicesByMediaType(TMediaType.Video); // for i := 0 to (DeviceList.Count - 1) do cmbboxCAMDevices.Items.Add(DeviceList[i].Name); {$ENDIF} end; {$IF DEFINED(ANDROID)} // DisplayRationale and PermissionsResulted is used only mobile! procedure TfrmFormMain.prcDisplayRationale(Sender: TObject; const APermissions: TArray<string>; const APostRationaleProc: TProc); var lRationaleMsg: string; i : integer; begin for i := 0 to high(APermissions) do begin if APermissions[i] = lMyCAMPermission then lRationaleMsg := lRationaleMsg + 'This app needs access your CAM to works' + SLineBreak + SLineBreak; end; // // Show an explanation to the user *asynchronously* - don't block this thread waiting for the user's response! // After the user sees the explanation, invoke the post-rationale routine to request the permissions // TDialogService.ShowMessage(lRationaleMsg, procedure(const AResult: TModalResult) begin // TProc is defined in System.SysUtils // APostRationaleProc; // used by System to go-back in before function... end) end; procedure TfrmFormMain.prcPermissionsResulted(Sender: TObject; const APermissions: TArray<string>; const AGrantResults: TArray<TPermissionStatus>); begin // verifying if the permissions was granted! - Here, testing only 1 permission = CAM if (Length(AGrantResults) = 1) and (AGrantResults[0] = TPermissionStatus.Granted) then prcCAMStartCapture { execute your procedure here if all it's ok } else TDialogService.ShowMessage('The permission <<CAMERA access>> not allowed by user'); end; {$ENDIF} procedure TfrmFormMain.prcCAMSampleBufferReady(Sender: TObject; const ATime: TMediaTime); begin // ****** // DONT USE "main thread" to process something "critial" like: process images by Cam // or anyother that can "crash" your UI (user interface) or app!!! // *************************************************************** // If exist images to process, then, put it on a "queue" to execute it! // Here, "prcSampleBufferSync" will be called always in a queue from main thread (your app) // to "dont paralize it" while the images it's processed!!! // // .............."main thread".........."method called" // TThread.Queue(TThread.CurrentThread, prcCAMSampleBufferSync); // end; procedure TfrmFormMain.prcCAMSampleBufferSync; begin // // use your imagination, to redirect this buffer !!! :) // // in the meantime ... let's write the pictures coming from the camera in the TImage lMyCAMDevice.SampleBufferToBitmap(imgVideoCapture.Bitmap, True); // end; procedure TfrmFormMain.prcCAMStartCapture; begin if not(lMyCAMDevice = nil) then begin // to Mobile (Android), change properties from CAMERA, needs permission! {$IF DEFINED(ANDROID)} if PermissionsService.IsPermissionGranted(lMyCAMPermission) then {$ENDIF} begin try lMyCAMDevice.StopCapture; // to avoid any error below // lMyCAMDevice.Quality := TVideoCaptureQuality.PhotoQuality; // lMyCAMDevice.StartCapture; // starting video capture! // prcMyLog('CAM device = Capture stated!'); prcMyLog('CAM ' + fncMyIIF(lMyCAMDevice.IsDefault, 'is', 'is not') + ' Default'); prcMyLog('CAM ' + fncMyIIF(lMyCAMDevice.HasFlash, 'has', 'has not') + ' Flash'); except on E: Exception do prcMyLog('Error Start CAM' + #13#10 + E.Message); end; end {$IF DEFINED(ANDROID)} else TDialogService.ShowMessage('Then CAM device needs your permission to access it!'); {$ENDIF} end else TDialogService.ShowMessage('None CAM device defined!'); end; procedure TfrmFormMain.sbtnCAMStopCameraClick(Sender: TObject); begin if not(lMyCAMDevice = nil) then begin // Needs "permissions" to read or change CAM properties! // {$IF DEFINED(ANDROID)} if PermissionsService.IsPermissionGranted(lMyCAMPermission) then {$ENDIF} begin if (lMyCAMDevice.State = TCaptureDeviceState.Capturing) then lMyCAMDevice.StopCapture else lMyCAMDevice.StartCapture; end {$IF DEFINED(ANDROID)} else TDialogService.ShowMessage('The <<CAMERA access>> permission is necessary'); {$ENDIF} end; end; procedure TfrmFormMain.sbtnCAMStartCameraClick(Sender: TObject); begin {$IF DEFINED(ANDROID)} PermissionsService.RequestPermissions( { } [lMyCAMPermission], { } prcPermissionsResulted, { } prcDisplayRationale { = nil, if you DONT WANT show any message! } ); {$ELSE} prcCAMStartCapture; // MSWindows or macOS {$ENDIF} end; initialization lMyCAMDevice := nil; {$IF DEFINED(ANDROID)} lMyCAMPermission := JStringToString(TJManifest_permission.JavaClass.CAMERA); {$ENDIF} finalization end. hug
  2. Latest Delphi Trying to send email from Android that is always sent to one address but can have up to 3 CC addresses......the send to address shows up ok in the email but not any of the CC addresses. The code I use is shown below. Intent := TJIntent.JavaClass.init(TJIntent.JavaClass.ACTION_SEND); sRecipients := TJavaObjectArray<JString>.Create(1); sRecipients.Items[0] := StringToJString(Recipient); ccRecipient := TJavaObjectArray<JString>.Create(1); ccRecipient.Items[0] := StringToJString(ccTechs); Intent.putExtra(TJIntent.JavaClass.EXTRA_EMAIL,sRecipients); Intent.putExtra(TJIntent.JavaClass.EXTRA_CC, ccRecipient); Intent.putExtra(TJIntent.JavaClass.EXTRA_SUBJECT, StringToJString(aSubject)); Intent.putExtra(TJIntent.JavaClass.EXTRA_TEXT, StringToJString(aBody)); Intent.setType(StringToJString('plain/text')); TAndroidHelper.Activity.startActivity(TJIntent.JavaClass.createChooser(Intent, StrToJCharSequence('Which email app?'))); The ccTechs variable is a string of addresses - each address separated by a comma. All works fine except the ccRecipient is always missing. Can someone please explain what I am doing wrong. Thanks in advance Bill Zwirs
  3. Alex Joseph

    Fetch server IP in android client app

    I have firedac datasnap server connected to mssql database server. I am using dbx connection from my firemonkey client app that is running on android mobile. Since I have different datasnap servers using the same App, how is it possible to acquire the IP address of the datasnap server with a parameter from client side. Can someone help me on this issue.
  4. lefjucabro

    Application is freezing after updating

    Hello, I started to develop an Android application with Delphi Tokyo, the application works on any devices. Then I developed the update with Delphi Rio and I have some issues when updating the application on some devices: the application freezes when opening. I had to remove application, delete files, restart the device and reinstall the application. On a new device or a device that has never had the application, I didn't have any problem. Due to lack of time, I could not solve this problem. Now I'm developing a new update on Delphi Sydney, the problem is still there and it's gotten worse: all of updated devices don't work. On a new device or a device that has never had the application, I don't have any problem again. It's a weird thing and I don't have any clue... Regards
  5. StephanWeber

    Photo app for Android and iPhone

    Hi, I made some apps with RAD Studio XE8 which run fine under Android and Windows. I have no commercial interests. But now I got an iphone SE 2020. Can anybody compile the apps for this? Looks more difficult. I can deliver the full sources, and the one doing this can use it freely and earn money. Have also a nice bow shooting app (Win and Android). And also many electrical engineering apps (Windows only). Note: Attached picture is German, but we can make it of course also in English. Bye Stephan
  6. Hi, Trying to set up a customized view for Samsung Tab S7 which has an 11" screen. I have been using the view for Android 10" and that works perfectly with the Samsung Tab S6 Lite but the customer now wants to use the Tab S7 and that places some of the buttons, nav bars in different positions on the S7 screen. The manufacture specs for the S7 state resolution 1600X2560 pixels, 16:10 ratio, ~274 PPI. Trying to followed the tutorial in the help file on Adding a Customized View to the View Selector but not sure where to get further information required such as MinPhysicalSize, MinLogicalSize and MaxLogicalSize as I am assuming the spec pixel size (1600 X 2560) is the MaxPhysicalSize. Also don't understand where to get the 'Artwork' for this device. Has anybody managed to setup a customized view for this device that could help me with the required figures or am I going in the wrong direction. Any help would be appreciated. Bill Zwirs
  7. Hello, I have my HTTPS proxy for my HTTP REST server. Both running on my development computer. I setup HTTPS proxy following instructions here: https://twigstechtips.blogspot.com/2016/01/nginx-how-to-set-up-ssl-reverse-proxy.html These instructions makes you generate two certificate files. KEY and PEM files. I added that PEM file in my project resources as resource type RCDATA and used identifier "my_ca". I used below link to prepare my security config xml https://stackoverflow.com/questions/56301765/self-signed-certificate-in-android-application-of-rad Using "@raw/my_ca" as in that stackoverflow question is failing with below error (while packaging the app) when I try to debug run the app. network_security_config.xml:6: error: Error: No resource found that matches the given name (at 'src' with value '@raw/my_ca/') So, I prepared my XML file as following: <?xml version="1.0" encoding="utf-8"?> <network-security-config> <domain-config> <domain includeSubdomains="true">yourdomain.com</domain> <trust-anchors> <certificates src="my_ca"/> </trust-anchors> </domain-config> </network-security-config> When I try to access my REST server like https://192.168.1.152/... I get following error Failed to parse XML configuration from network_security_config On the other hand, I can get results just fine using identical URL and Postman on Windows OS. I simply failed to figure how to add that self signed certificate in my app package and use it. Any help is appreciated. Thanks & Regards, Ertan
  8. Alexandre Pires

    How to read a table every x time.

    Hi Guys, I need my Android background service to read a table from my database every 30 seconds. What would be the best way to do this? I am currently using an infinite loop in a thread and sleep, but I believe it is not the best approach. @Dave Nottage Is there any kastri component that helps to do this? I am using Delphi 10.3 Thanks for some help Alexandre
  9. Hello everyone, I am having trouble showing a secondary form from the main form OnShow event for (only) the Android platform. The Show call does nothing at all except for a short delay. The main form stays active and functions correctly. The program runs nicely on Windows. This second form is StayOnTop and position=Designed with the same size as the main form. Thanks in advance for any help I can get. procedure TMainForm.FormShow(Sender: TObject); begin SetScreensLang; if MustSignIn then begin TabControl1.ActiveTab := PersonalTabItem; SignForm.Show; end else begin CheckAlerts; TabControl1.ActiveTab := AlertsTabItem; AlertsTabItemClick(nil); end; end;
  10. Hi there, I want to use the TRestClient components mainly under mobile platforms (iOS, Android), and I want to enhance and ensure the security concept for a new app. So far that means I need to verify the certifications under all conditions, same like browsers do. Since I have seen issues with apps which doesn't check certificates properly, but since Rx10.2.2 there should be all the events in place now. The client throws an event OnValidateCertificate, which could be used to verify a certificate, I think that is the right one, not really the OnNeedCertificate event, as noted in the blog from Marco above. This event returns certain infos in the TCertificate object, which are helpful to identify and verify the certificates: TCertificate = record CertName: string; SerialNum: string; Expiry: TDateTime; Start: TDateTime; Subject: string; Issuer: string; ProtocolName: string; AlgSignature: string; AlgEncryption: string; KeySize: Integer; function IsEmpty: Boolean; end; Unfortunately there is no real simple way to check the certificate status provided, e.g. from a test-site like BadSsl.com. It seems that this can be achieved only by heavy OpenSSL and touching the OCSP protocol, maybe then the app can be able to check the full status correctly and completely. While on the other side the native browsers can do this easily, as a side-effect more or less. From my understanding of the System.Net libraries, their basic idea is to use the underlying OS SSL systems, which works well for the HTTPS connection part. But I cannot really find any simple way to make use of the underlying OS for checking certifications, even if everything for checking certificates, like OpenSSL, should be in place in the OS. So I think about using the browsers of the OS, which have such support integrated, and should be perfect candidate to check the status (Safari, Chrome). But there is also no easy way to get data from the browsers from an app either, or is there any documented way I haven't seen yet ? Moreover, even if there would be a way to get that data: Would the access to the system browser be considered as "safe", from a high security standpoint ? There could be still a man-in-the-middle attack taken place, although the risk is IMHO quite low. Is there any simple Delphi/FMX "certification checker" out there which I haven't seen yet, or do I have to re-invent the wheel ? Maybe some security experts have tips to flatten the way, to reach a high security certification of the apps.
  11. Hi there, I'm sure most of you were aware of @Dave Nottage and his very helpful (live-saving) Kastri(Free) projects. Now with the presentation of the Memorizer, there are certain discussions about issues in the cross-platform world. Same as Dave I try to postpone permission requests to the bitter end, just before touching the hardware. For camera, sensors, etc. thats usually no issue. The problems may start when using local notifications, or related permissions, like Bluetooth and location. The local notifications permissions are fired right at startup, and thats annoying. You can imagine if you need a few permissions at startup, then they all will appear, and the user has to click them away before showing any useful screen. But for local notifications permission this might be maybe the right way too, because in mobile you also can run in foreground or background. So I would like to discuss the possibilities and pros and cons we have, for the permission settings from a users point-of-view. 1. Ask permission right after startup (as is now) - this is annoying to the user, especially if several requests appear one after the other - works in all cases, also for background mode, as it forces the user to decide - its a little like the old "Android way", permit all before use anything, but Androids style has changed meanwhile (for good reasons) - sometimes the app runs in background, and has no other chance to notify, than by local notification So the local notification permission shall be given at startup, to ensure this works. 2. Ask permission short before usage (in foreground) - thats what I like too, users shall decide each function before they use it. - but when moving to background w/o giving permission before, this might fail. A user cannot give permission while in background mode, the function simply fail or crash. 3. Ask permission short before going to background - this is not possible, because the app cannot do much when changing the states, especially no long-lasting alerts. 4. Allow permission in a special setup dialog - This is the "windows" setup philosophy, I think very much out of fashion in mobile: Force the user to visit setup first. - This will solve the issue in 2.), but I really try to to avoid this forcing of "setup" style design. Are there any other ideas or use-cases ? So far I think 1.) (as is) has its need too, and its not easy to cover all use-cases with one solution in mobile, there are too many options. Beside that, Android and iOS might have different philosophies as well, howto get them all under one umbrella ?
  12. Hi, After updating to delphi 10.4 and SDK 29 the camera and gallery do not work on Android 10 Also delphi examples don't work. After taking a photo from the camera the app doesn't return anything while the gallery, after choosing the photo, raises this execption First chance exception at $ 00000074D87D473C. Exception class EBitmapLoadingFailed with message 'Loading bitmap failed (/data/user/0/com.embarcadero.CameraRoll/cache/IMG_20200911_1728082355078942815963051.jpg).'. Process CameraRoll.apk (11714) any ideas?
  13. Hi, I try to run the following code on Android (10.4 Sydney) fn:=TPath.Combine(TPath.GetSharedDocumentsPath(),'OLA'); TDirectory.CreateDirectory(fn); // or ForceDirectories(fn) -> I tried both functions if TDirectory.Exists(fn,false) then showmessage('Ok') else showmessage('Failed'); And the code fail. The same code works without any problem with 10.3.3 (using the same phone) Note: On both environments I have used default User Permissions. including "Write external storage" Did you encountered this problem? - how did you solved? Thank you in advance, Pavel
  14. Hi there, I'm looking for a scripting engine in my projects, and since I had last time contact with scripting this is some years ago. I would like to check out the pros and cons of the solutions, to find the best fitting match for me. Since paxCompiler seems gone by Apex, this is maybe out of sight now, but I'm not so sure about that. DwScript is not available on mobile, as far as I know. DwScript is somewhat available in different forks (so it seems), not sure which one is the right one to choose. Maybe the list of engines is nit final, please let me know if there is something missing. What I'm looking for is a script engine that has the following features (I've put the most important in bold) usage for some base analysis and event control lightweight very stable well supported and documented Pascal supporting multiple languages would perfect, but not a main criteria (JS, C++, C#, Basic) Multiple platforms Win, Macos, Linux, iOS, Android is a must have supporting full language support is nice to have, but not a must (I can skip the special stuff I would say). performance (not that critical, but should be able to process dynamic protocols behaviour reasonable well ) memory footprint good, active community Free to use in commercial products I hope you can bring some light in this dark forest of possibilities, and share some experiences.
  15. Few months ago I prepared small demo application used FireDAC SQLite connection on an Android system. And it worked fine in an application built in Delphi 10.3. Then I updated Delphi to 10.4. And now I got: Project xxx.apk raised exception class ESQLiteNativeException with message ''. and after that: [FireDAC][Phys][SQLite] ERROR: no such table: items. Even table 'items' exists in the database file and I did not any changes in sources. Anyone had the same issue?
  16. i am using Delphi 10.3.3, and i develop app for Android with local language fonts (Sinhala Sri Lankan Language), same font i can see in my mobile no issue, but when use the same font for my app fonts shows weird, for your reference i am attaching 2 screenshot with the app and same text with my mail phone and the fonts i use. and i already add to the deployment, and given the path .\assets\internal as well still the problem same, if you can help me i relay appreciate, since i am not professional developer still i am just learner, Noto Sans Sinhala.ttf
  17. Hi there, are you able to work with yor projects on Patch 3 on mobile (Android, iOS) ? I've tried a while, but then moved back to Patch 2, which works more or less on Android with API-level 29. That was my main goal why I ported my apps to Patch 3. What are your experiences with that patch on different platforms ?
  18. Hi I'm using Delphi 10.3.3. I have a problem with TLabels on Android. There are horizontal or vertical lines on some letters in the TLabel. As you can see on the attached image, the "d", "y" and "A" of the label "Cloudy Apple Juice" have lines on them. So do the "h", "O", "u", "c" and "e" of the label "Fresh Orange Juice". I'm using Java JDK version 1.8.0_261. I don't know if this has anything to do with it, but lately I had to uninstall the JDK (of which I don't remember what the version was) and reinstall it (version 1.80._261). Has anyone encountered this before? And what is the default version installed by Delphi 10.3.3.
  19. Hi I'm using Delphi 10.3.3. I have a problem with TLabels on Android. There are horizontal or vertical lines on some letters in the TLabel. As you can see on the attached image, the "d", "y" and "A" of the label "Cloudy Apple Juice" have lines on them. So do the "h", "O", "u", "c" and "e" of the label "Fresh Orange Juice". I'm using Java JDK version 1.8.0_261. I don't know if this has anything to do with it, but lately I had to uninstall the JDK (of which I don't remember what the version was) and reinstall it (version 1.80._261). Has anyone encountered this before?
  20. hello All: . May i know please the right way to work with custom fonts inside android.?i have Patch this unit here: (FMX.FontGlyphs.Android), but no effect....i know that Alcinoe controls are native device controls and the paint in fmx android is ( FPaint: JPaint; )please guide me and if there is any demo or sample will be more helpful..i have watch in youtube how can do that in android studio and i follow the same steps but the controls didn't change their font as i expected ...i deploy a folder inside the res remote path named as (font) an inside that folder i deploy two xml files( attr.xml and myfont_familly.xml) and also deploy my fonts there ..after that i go to my custom styles.xml and i add this line here:<item name="android:fontFamily">@font/myfont_familly</item>but when i compile to run in android no effect happen ???please any reply will be so usefull SMS Read-Write.rar
  21. How limit to one instance on android, windows, linux and mac ? There is any cross platform code? Thank you in advance. Pavel
  22. Chester Wilson

    Manual handling of virtual keyboard

    Is there a way to stop the automatic pop up / pop down of the android virtual keyboard? (So I can do it manually when I want it.) The application has a tMemo which provides information to the user. As there is not much room on a small android, it requires scrolling up and down at times. At these times the bloody keyboard comes up and gets right in the way!
  23. Hi there, I'm checking in iOS (and later for Android, Windows, etc.), what is the best, right way to Sleep in a background mode of the OS. The implementation for iOS seems to be same, as Posix, for iOS, Android, Macos, but I didn't checked that. My goal is to stop any OS operation in the background mode, to avoid killed apps by the OS. While the Thead loop is still active, but only throttled. TThread.Sleep - uses usleep, which is external function, as far as I know based on nanosleep - is this really affecting the current thread only ? class procedure TThread.Sleep(Timeout: Integer); begin {$IF Defined(MSWINDOWS)} Winapi.Windows.Sleep(Timeout); {$ELSEIF Defined(POSIX)} usleep(Timeout * 1000); {$ENDIF POSIX} end; System.SysUtils.Sleep - is bascially same {$IFDEF MSWINDOWS} procedure Sleep; external kernel32 name 'Sleep'; stdcall; {$ENDIF MSWINDOWS} {$IFDEF POSIX} procedure Sleep(milliseconds: Cardinal); begin usleep(milliseconds * 1000); // usleep is in microseconds end; {$ENDIF POSIX} System.SyncObjs.TEvent.WaitFor - is defintively based differently - uses a sem_timedwait (here and here also) - this probably waits by counting in a semaphore, so its not a "real" sleep of the OS, right ? Shall I better use Sleep or TEvent.WaitFor, to let threads sleep in the OS, while avoiding too many wakeups and operations in the background ? Is TEvent.WaitFor really sleeping, from a iOS OS perspective, or will it be seen as running app ? What I assumed before is that TThread.Sleep really stops the thread, and passes back CPU operation to other tasks, but I'm not so sure anymore under IOS.
  24. I was able to use Firemonkey to develop a multi-platform game, specifically for Android at first. After thoroughly debugging the app when running in Windows, I then deployed it in my Android tablet, and there were several problems, especially with regard to drag-and-drop, plus images that would remain on the screen when they should have disappeared. These problems were intermittent -- difficult to re-produce reliably. Nevertheless, I spent many hours trying every little trick I could think of in terms of structuring the code (e.g. different ways of trying to make a glyph disappear), but still could not get the functionality to where it needed to be. I was using Android 32-bit - Android SDK 25.2.5. Again, this app would run consistently and perfectly when running the Windows version! Unfortunately, I'll have to give up on this project unless someone has a bright idea.
  25. Hello, I was developing a mobile application for my school, I were using Delphi Rad Studio Rio 10.3. Here is brief description what application is doing: in some editboxes user adds data -> proceed to next tab On second tab user is choosing video that he wants to preview, while video is playing he is clicking some buttons to mark duration of some activities on video that he loaded ... After that i am making a PDF report and saving to storage. I made whole application and it is working great, problem is that I used this library for slowing down video preview -> https://github.com/Zeus64/alcinoe i had some issues with this library ( most of them were configuration issues ) but at the end I managed to resolve all of them and make my app. So why I used this library? Answer is that it had option to set speed preview of video. Before I started using this library i was trying for a few days to implement this -> https://stackoverflow.com/questions/18526336/playback-video-in-slow-motion-in-android check answer from " karanatwal.github.io " Problem was that I didnt know how to rewrite this android code into delphi FMX code : videoview = (VideoView)findViewById(R.id.videoview); videoview.setVideoURI("Your Video URI"); videoview.setOnPreparedListener(new MediaPlayer.OnPreparedListener() { @Override public void onPrepared(MediaPlayer mp) { //works only from api 23 PlaybackParams myPlayBackParams = new PlaybackParams(); myPlayBackParams.setSpeed(0.5f); //here set speed eg. 0.5 for slow 2 for fast mode mp.setPlaybackParams(myPlayBackParams); videoview.start();//start your video. } }); So now I would like to rebuild my application and exclude this " alcinoe " library cuz I use it only for setting playback speed.. Can somebody help me rewriting this to a delphi code ? Thank you EDIT: I will later post code snippet of how i retrieve path of video and how i load it, code is not that great because it was one of my first projects but maybe it will help someone who reads this.
×