Jump to content

All Activity

This stream auto-updates     

  1. Today
  2. pyscripter

    JSON benchmarks

    No. Most of the alternatives do not support serialization. Grizzy and Superobject do. Delphi offers a couple of ways. But serialization is not necessarily dependent on JSON parsing. For example NEON is using System.JSON.
  3. apachx

    In App Purchase (consumable and subscription)

    Hi everyone, I’m implementing subscription functionality in my mobile app using Google Play Billing and TInAppPurchase in Delphi. I’ve encountered an issue that I hope someone here might have already faced and solved. When a user cancels a subscription, and the previously paid period fully expires, I expect that the app would stop recognizing the subscription as active. However, even after calling: InAppPurchase.SetupInAppPurchase; InAppPurchase.QueryProducts; …the subscription still appears active in the app — InAppPurchase.IsProductPurchased(PlayMarketProductID) continues to return true. But if I restart the app, the same method correctly returns false, and the subscription is no longer shown as active. This leads me to believe that either the TInAppPurchase component or the underlying Google Billing client caches the subscription status, and that cache isn't invalidated until app restart. 👉 Is there a way to force-refresh the current subscription state without restarting the app, after the subscription has been cancelled and fully expired? Thanks in advance!
  4. Tommi Prami

    JSON benchmarks

    Way cool! Is there test/comparison is Objects and/or Record serialization supported and speed etc?? Did not check code, because bit busy... I've used Grijjy in one of my hobby projects for serializing objects and/or records. Can't remember which they all are, poossibly both)
  5. Yesterday
  6. Thanks Remy that's a great resource. Link saved for reference.
  7. Alberto Fornés

    Subscribe to a topic with TIcsMQTTClient

    Problem solved. I set the subscription to reading/boxes/+, and the correct option was reading/boxes/#. Thanks to those who responded and tried to help.👍
  8. Angus Robertson

    Subscribe to a topic with TIcsMQTTClient

    The onClientMsg event is only triggered for published messages, Sorry, don't know off hand which event is triggered to acknowledge subscribe, you'll need to check the source code. Angus
  9. Alberto Fornés

    Subscribe to a topic with TIcsMQTTClient

    I don't receive any message in the event: MQTTClientMsg(Sender: TObject; aTopic: UTF8String; aMessage: AnsiString; aQos : TMQTTQOSType; aRetained : boolean)
  10. OK. > but I don't receive any messages like I see in MQTT Explorer. Is it the lack of a confirmation the subscribe was successful? or Is the value in the server changing and you are not being notified?
  11. Alberto Fornés

    Subscribe to a topic with TIcsMQTTClient

    Yes, it appears as the last message when I log in and subscribe
  12. Alberto Fornés

    Subscribe to a topic with TIcsMQTTClient

    This is the Mosquito log when connect to server:
  13. pyscripter

    JSON benchmarks

    hydrobyte/TestJSON: A simple project to test JSON libraries with Delphi and C++Builder. presents JSON library benchmarks comparing a large number of alternatives. One thing that strikes me, is that the System.JSON rtl library is doing relatively well compared to the competition, both in terms of performance and in terms of JSON validation. With the exception of Find, is very competitive in all other areas. I have seen many claims that System.JSON is very slow and that the xyz library is so many times faster. Do these benchmarks suck (like most benchmarks)? Or is it the case that System.JSON is not that bad? What is your experience?
  14. Angus Robertson

    Subscribe to a topic with TIcsMQTTClient

    My Mosquitto log shows exactly that. 2025-03-21T12:51:02: Received SUBSCRIBE from CID64860 2025-03-21T12:51:02: update/memo (QoS 2) 2025-03-21T12:51:02: Sending SUBACK to CID64860 Angus
  15. Did you receive a SUBACK response when you subscribed?
  16. Angus Robertson

    Subscribe to a topic with TIcsMQTTClient

    First place to look would be the Mosquitto log file, maybe subscribe failed for some reason. I did test the latest version against local and remote Mosquitto servers, but my knowledge of the MQTT protocol is almost nil so I don't know what to expect when I click the various test buttons. Angus
  17. Sorry, no updates. Not using Delphi much, except from small utils. Haven't checked on the problem since 12.3.
  18. Hi, I have a Mosquitto server that publishes messages and I can subscribe to it using programs like MQTT Explorer. By testing with TIcsMQTTClient, I can connect to the host and port (it also uses a username and password) and it validates. I subscribe to a topic, but I don't receive any messages like I see in MQTT Explorer. Is there anything I should check that could be causing me to not receive the messages?
  19. GabrielMoraru

    Delphi 11.1 + patches - No debug source / breakpoints?

    @Lars. Updates on this? I have a similar problem where debugging in Delphi 11.3 works.... for a while. Then suddenly all breakpoints are ignored. (Suddenly = I change one line a code and I recompile). I can't even put a breakpoint into the DPR! The project is properly set. I even turned on "map file" and "debug info into exe" in the Linker page. The project is really really large: Exe file (with debug info inside) 191MB. Exe file (without debug info inside) 51MB. Map file = 43MB. DCUs = 4MB (the rest is in (DPK) libraries).
  20. A.M. Hoornweg

    Stringgrid objects problem

    If you want to store either integers or objects into your grid, just declare a simple class that contains an integer. That way you can consistently store objects in the grid and treat everything alike. And you can simply test if the object is an integer or something else: "(if Obj IS tInteger then ...)" Type tInteger=Class protected fValue:Integer; public Constructor Create(const aValue:Integer); Property Value: Integer read fValue write fValue; end; Constructor tInteger.Value (const aValue:integer); begin fValue:=aValue; end;
  21. Fudley

    Any *new* controls added, events do not trigger

    I had to revert back to an earlier version and manually redo the changes one by one since then. I still don't know how or why it happened.
  22. ŁukaszDe

    Debugger keeps the execution line centered

    I have CnPack and DDevExtensions installed. If you do not have any extra tools, it is a bug in IDE.
  23. bk31415

    Why Pos() and Lines.SelStart differ?

    I led myself to think the reason to be more complex --like count of CRLF's etc. But, 0/1-base issue never occured to me. Thank you.
  24. Stefan Glienke

    Why Pos() and Lines.SelStart differ?

    Because Pos is 1-based while SelStart is 0-based. You could have read the documentation: https://docwiki.embarcadero.com/Libraries/Athens/en/System.Pos https://docwiki.embarcadero.com/Libraries/Athens/en/Vcl.StdCtrls.TCustomEdit.SelStart
  25. This is sample code: procedure TForm1.Button1Click(Sender: TObject); const CRLF = #13#10; var Text1: String; Pos1: Integer; begin Text1 := '[' + CRLF; Text1 := Text1 + '{' + CRLF; Text1 := Text1 + '"country":"AD",' + CRLF; Text1 := Text1 + '"name":"Sant Julià de Lòria",' + CRLF; Text1 := Text1 + '"lat":"42.46372",' + CRLF; Text1 := Text1 + '"lng":"1.49129"' + CRLF; Text1 := Text1 + '},' + CRLF; Text1 := Text1 + '{' + CRLF; Text1 := Text1 + '"country":"AD",' + CRLF; Text1 := Text1 + '"name":"Pas de la Casa",' + CRLF; Text1 := Text1 + '"lat":"42.54277",' + CRLF; Text1 := Text1 + '"lng":"1.73361"' + CRLF; Text1 := Text1 + '},' + CRLF; Text1 := Text1 + '{' + CRLF; Text1 := Text1 + '"country":"AD",' + CRLF; Text1 := Text1 + '"name":"Ordino",' + CRLF; Text1 := Text1 + '"lat":"42.55623",' + CRLF; Text1 := Text1 + '"lng":"1.53319"' + CRLF; Text1 := Text1 + '},' + CRLF; Text1 := Text1 + '{' + CRLF; Text1 := Text1 + '"country":"AD",' + CRLF; Text1 := Text1 + '"name":"les Escaldes",' + CRLF; Text1 := Text1 + '"lat":"42.50729",' + CRLF; Text1 := Text1 + '"lng":"1.53414"' + CRLF; Text1 := Text1 + '}' + CRLF; Text1 := Text1 + ']'; {26 lines} Pos1 := Pos('Ordino', Text1); Memo1.Lines.Text := Text1; Memo1.SelStart := Pos1; Memo1.SelLength := Length('Ordino'); Memo1.SetFocus; end; When I run this, I expect Memo1.SelText to be 'Ordino' but the actual selected text turns out to be 'rdino"'. I am baffled why it shifts 1 char right. Could someone explain why.
  26. Dave Nottage

    How to send and intercept USSD result

    From the readme: "NOTE This code is dependent on code from the Kastri repo."
  27. khaledAlamdar

    How to send and intercept USSD result

    Thank you for your quick response.🧡 But I couldn't find the file DW.Permissions.Helpers to run it.
  1. Load more activity
×