Jump to content

Vanar

Members
  • Content Count

    53
  • Joined

  • Last visited

Community Reputation

3 Neutral

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Hello! I am developing an Android application using the mechanism from the demo project ForegroundLocationDemo (Delphi 12) ForegroundLocationDemo works fine, but I can't programmatically restore native activity from the background after reaching the target. Please tell me how to do it so that under a certain condition (say, when a certain location is reached) programmatically bring native activity out of the background in the procedure: procedure TLocationTrackingModule.LocationSensorLocationChanged(Sender: TObject; const OldLocation, NewLocation: TLocationCoord2D); begin FLocation := NewLocation; if FIsRunningInForeground then Begin FNotificationManager.notify(NotificationId, GetNotification); {$REGION 'My code'} If NewDistance <= Distance Then Begin StopLocationTracking; // Stopping this service turns it into only a bound service ??? // Restore native activity from background End {$ENDREGION 'My code'} End else begin if Assigned(FLocationUpdated) then FLocationUpdated(NewLocation); end; end;
  2. Vanar

    Screen Brightness in iOS

    Thanks everyone! I applied Dave's solution. Thread closed.
  3. Vanar

    Screen Brightness in iOS

    I know for sure that it is possible. In most applications from stores, when calling (showing) QR, the brightness of the iPhone screen increases ...
  4. Vanar

    Screen Brightness in iOS

    Tell me, how can I programmatically control the screen brightness under iOS?
  5. Vanar

    Speech to text translation (iOS)

    Thank you! Topic closed
  6. Vanar

    Speech to text translation (iOS)

    How to translate speech to text on iOS? If possible, please provide a link to an example
  7. I agree, but I just wanted to test it. On iOS, the error is:
  8. Hi, Vladsrb! I tried your solution It works great on Windows! But I need to run it on iOS "-For reading FB token on IOS i use: Firebase SDK for IOS 6.28 (working on Delphi 12.2)" Could you please describe the process in more detail: How do I use Firebase SDK for IOS 6.28, where can I download Firebase SDK (GetIt doesn't work for me for some reason), where and what links should I write in the project?
  9. Hi, John I didn't find a normal solution I temporarily solved the problem like this: They give me a ready-made authorization key: ya29.c.c0ASRK0Ga_4Z1QIYsqufOCVdT ...., created on the server using PHP And I slip it into my request ...
  10. I always received FDeviceToken from the request https://iid.googleapis.com/iid/v1:batchImport HTTP HEADERS: Content-Type: application/json Authorization: key=YOUR_SERVER_KEY BODY: { "application": "com.company.app", "sandbox":true, "apns_tokens":[ "7c6811bfa1e89c739c5862122aa7ab68fc4972dea7372242f74276a5326f...." ] } Answer: { "results": [ { "registration_token": "ejXQlECjCeI:APA91bE7oaUhaFnGyl77lFrySdEaWxocM0oj81uNezACX1wsZXiTyL4OYo5ssvFjjWYpFymMVyqBccboVcwTTW2rvykOmV_CABDM7rTIRCiJFl_9ngf7SrDSYoFouwNj69JSwlH.....", "apns_token": "7c6811bfa1e89c739c5862122aa7ab68fc4972dea7372242f74276a5326f....", "status": "OK" } ] } But recently this request stopped working (authorization required). I get the answer: { "error": "Not authenticated or unauthorized"} How to solve this problem? How to rewrite the query? Most likely it is related to this
  11. Vanar

    Non-breaking spaces in TListItemText (iOS)

    Clarification (I probably didn't write it precisely enough): Under Windows, all variants 1. ListItemText.Text := 'This is a non-breaking space:' + #$00A0 + 'here.'; 2. ListItemText.Text := 'This is a non-breaking space:' + #160 + 'here.'; 3. ListItemText.Text := 'This is a non-breaking space: here.'; work fine The problem occurs in iOS (I haven't tried it under Android, but they say it works) My task is to implement it for iOS
  12. I have a problem with wrapping a line with non-breaking spaces in TListItemText. The wrapping ignores non-breaking spaces. For example, Var Te: TListItemText; AItem: TListViewItem; ... Te := TListItemText.Create(AItem); Te.Text := "******************** Received 1 000 bonuses"; // There is a non-breaking space between "1" and "000" Te.Width := 120; Te.height := 20; Te.WordWrap := True; ... I want to get: "******************** Received 1 000 bonuses", but I get what is shown in the picture. "******************** Received 1 000 bonuses". Is it possible?
  13. Thanks for the answer, but can you explain in more detail or maybe you have a ready-made module? "- Another option would to edit the linking of the static library in the unit, to use the iOS native lib."
  14. I tested Kastri-master\Demos\AdMob. Advertising works perfectly in both iOS and Android! But when I try to use this mechanism in my iOS application, the application does not start (crashes on startup) Everything works well under Android. After a long search for the error, it turned out that the culprit is the unit FireDAC.Phys.SQLiteWrapper.Stat, which is used in my application! I can’t give up the unit FireDAC.Phys.SQLiteWrapper.Stat, since I’ll have to rewrite everything. The problem is described in https://en.delphipraxis.net/topic/6440-firebase-adertising-problem-after-ios-14/ and the same thing happens to me How to check (see the error): If you add the unit FireDAC.Phys.SQLiteWrapper.Stat to Kastri-master\Demos\AdMob\Unit1.pas, the iOS application does not launch (crashes on startup) Are there ways to fix the error?
×