Jump to content

Dave Nottage

Members
  • Content Count

    1496
  • Joined

  • Last visited

  • Days Won

    36

Everything posted by Dave Nottage

  1. Dave Nottage

    Something like SimpleNote with an API?

    How about OneNote, or Dropbox Paper? Or in a pinch: Google Keep - this isn't really meant for what you want.
  2. Dave Nottage

    D11,unsupported version of Play billing

    I've since seen your reply on Facebook, which indicates you're interested in the new features. I'll take a look into what changes might be possible, however it would be at least later in the week.
  3. Dave Nottage

    D11,unsupported version of Play billing

    Can you test it, and report what problems you have with it, if any?
  4. Dave Nottage

    D11,unsupported version of Play billing

    Genuine question: Which code do you think you need to update, and why? To support subscriptions (which apparently are new in v5), or something else?
  5. Dave Nottage

    Trouble installing Ios SDK

    You need an M1 or M2 Mac in order to run apps on the simulator from Delphi
  6. In this instance topics won't help, since the topic needs to be subscribed to from the client side. As above, topics are subscribed to from the client side, so for your case you would need to implement message groups, as per the link I posted in my previous reply. As long as you have the tokens, you can select some at random, send a request to FCM for a notification key that includes all the selected tokens, then send a message using that key.
  7. As per the documentation, you do not create an instance of WKScriptMessage, and in any event, you cannot descend from TWKScriptMessage anyway. Also as per the documentation it is used when you implement custom Javascript message handlers. What you could do is use the evaluateJavaScript method of WKWebView and pass to it a completion handler, which could be declared on your main form like this: procedure JavaScriptCompletionHandler(obj: Pointer; error: NSError); ..and implement it like this: procedure TfrmMain.JavaScriptCompletionHandler(obj: Pointer; error: NSError); var LJavaScriptResult: string; LCode: Integer; begin if obj <> nil then LJavaScriptResult := NSStrToStr(TNSString.Wrap(obj)) else LJavaScriptResult := 'null'; if error = nil then LCode := 0 else LCode := error.code; // Do something with LJavaScriptResult and LCode, here end; Call evaluateJavascript like this: LWebView.evaluateJavaScript(StrToNSStr(AJavaScript), JavaScriptCompletionHandler) Where LWebView is a reference to the WKWebView in the iOS implementation of TWebBrowser
  8. Thanks! It's much easier to have each of the devices subscribe to a topic using the SubscribeToTopic method, and simply send the push notification using a topic, rather than multiple tokens. If you really do want to base it on individual tokens, see: https://firebase.google.com/docs/cloud-messaging/js/device-group It's in Javascript, however something similar could be constructed in Delphi.
  9. Dave Nottage

    CE registering problem

    Absolutely sure. Please see: https://blogs.embarcadero.com/delphi-11-and-cbuilder-11-community-editions-released/
  10. Dave Nottage

    CE registering problem

    The community edition is 11.3, not 11.0 That's because the version number is 11.3. Please consider changing the topic of your post - it is completely misleading
  11. Dave Nottage

    Advice, Please - Notifications

    On Android, for notifications to still work after a reboot, you would need to persist them in some way, and recreate them, *and* have the app start at boot. I have an example of how to have an app that starts at boot, here: https://github.com/DelphiWorlds/Kastri/tree/master/Demos/AndroidStartAtBoot This is a demo from Embarcadero of how to create/send notifications: https://github.com/Embarcadero/RADStudio11Demos/tree/main/Object Pascal/Mobile Snippets/Notifications/SendCancelNotification As discussed above, if you want to recreate the notification at device start you would also need to persist them somehow, e.g. using a database, or perhaps as JSON, read the data and recreate the notifications when the app starts. You would need to handle when a notification is received, so that you remove it from the persisted notifications. On iOS, as far as I know you are out of luck regarding recreating notifications at device start - there does not appear to be anyway for an app to handle this, without the user starting the app.
  12. Dave Nottage

    Switching network, ipv4 and ipv6, Indy

    That old code has morphed into this: https://github.com/DelphiWorlds/Kastri/tree/master/Demos/Connectivity which no longer requires the separate static library. It should be able to be used in 10.4.1 (perhaps with changes if necessary)
  13. Dave Nottage

    RX10.4.2 with Mac PAServer 12.2.10.3

    The link is not published, but follows the same pattern as for 10.4.1, i.e.: http://altd.embarcadero.com/releases/studio/21.0/1/PAServer/2/PAServer21.0.pkg
  14. Dave Nottage

    TWebBrowser: Remove Scrollbars not working

    Alternative solution to those posted so far: uses Winapi.WebView2; const cJavaScriptHideScrollbars = 'document.querySelector("body").style.overflow="scroll";var style=document.createElement("style");' + 'style.type="text/css";style.innerHTML="::-webkit-scrollbar{display:none}";document.getElementsByTagName("body")[0].appendChild(style)'; constructor TForm1.Create(AOwner: TComponent); var LWebView: ICoreWebView2; begin inherited; // The following *should* work, but this report was not completely fixed!: https://quality.embarcadero.com/browse/RSP-38165 if Supports(WebBrowser1, ICoreWebView2, LWebView) then LWebView.CallDevToolsProtocolMethod('Emulation.setScrollbarsHidden', '{"hidden":true}', nil); WebBrowser1.Navigate('https://www.embarcadero.com'); end; procedure TForm1.WebBrowser1DidFinishLoad(ASender: TObject); begin // This works for me, but the scrollbars do not disappear until the page is loaded WebBrowser1.EvaluateJavaScript(cJavaScriptHideScrollbars); end; This is when using EdgeIfAvailable or EdgeOnly for the WindowsEngine property
  15. Dave Nottage

    MacOs Ventura and NaN

    Can you post code that reproduces the issue? It'll save having to type out the code, and work out the cut off parts, if they're important.
  16. Dave Nottage

    Send Email from Android with HTML message body

    I have an import for it, here: https://github.com/DelphiWorlds/Kastri/blob/master/API/DW.Androidapi.JNI.Text.pas
  17. Dave Nottage

    Video with Overlays is very jerky

    If you have code that is used to update the information in the overlays, try removing it temporarily, to see whether it's caused by the overlays themselves. If that improves the playback, you may want to consider executing the code in a separate thread, synchronize with the main thread when it is done, and update the overlays then.
  18. Are you talking about the demo, or your own app? If your own app, did you follow the instructions in the readme? Either way, please indicate what version of Android you have on your device.
  19. I took a keen interest in this, so have put together a demo, here: https://github.com/DelphiWorlds/Kastri/tree/master/Demos/NotificationListenerService Please ensure that you read the readme, as it has information about how to configure a project of your own, should you use the code that the demo uses.
  20. Please provide a link to the documentation that led you this point, or at least examples in Java or Kotlin that achieve the same result
  21. Dave Nottage

    Unable to execute '"C:\Program Files\Java\jdk-17.0.1\bin\java.exe" 

    Is this a project created in an earlier version of Delphi? If so, you may need to follow the step described here.
  22. Dave Nottage

    Unable to execute '"C:\Program Files\Java\jdk-17.0.1\bin\java.exe" 

    Once again, not enough information
  23. Dave Nottage

    Unable to execute '"C:\Program Files\Java\jdk-17.0.1\bin\java.exe" 

    As per my earlier reply, later versions of Delphi require the OpenJDK. You can install it from the Delphi IDE by using Tools | Manage Platforms, select the Additional Options tab, select Eclipse Temurin OpenJDK 11 (Hotspot) JVM and click Apply. Once installed, you'd need to modify your Android SDK settings to use the installed JDK:
  24. Dave Nottage

    Unable to execute '"C:\Program Files\Java\jdk-17.0.1\bin\java.exe" 

    It may depend on which version of Delphi you are using. Later versions of Delphi (e.g. 11.3) require the OpenJDK. It's hard to tell without more information, including the rest of the error message
  25. Dave Nottage

    Android development Pixel 7 Pro

    Pixel 7 Pro shipped with no 32-bit support. You need to compile for 64-bit, or perhaps use this: https://github.com/ThomasKing2014/Pixel7_32bit_helper
×