Jump to content

Yaron

Members
  • Content Count

    293
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Yaron

  1. Yaron

    64bit testing hardware/emulation

    I wouldn't be surprised if the tablet has 6GB but only 4GB is addressable. Chinese tablets can be funny that way, like them marketing the resolution as 1900x1200, while in reality it's 1280x800 but with a scale factor that makes it appear to be 1900x1200.
  2. Yaron

    64bit testing hardware/emulation

    Last year, I bought a cheap Chinese (CARBAYTA S119) tablet, 6GB RAM, Android 9 to verify that my apps work on the latest Android version and to play with tablet layouts. It has a 64bit octa-core chip, but still runs Android 32bit. Also, My Galaxy Note 4 runs Android 6.0.1 32bit, so the version of Android doesn't seem to matter either.
  3. Even though I have a subscription, I did not receive an invitation and now I have a quick Android project that I wanted to beta-test through the play store and... impossible. While this is a small hurdle now, there are projects that are due in a month or two that I simple can't release, it doesn't seem like google is accepting exemptions on new projects.
  4. I'm trying to create a smooth UI experience by loading a webpage in the background and only showing it later on when a user clicks a button in the app. To load the webpage I'm using: TWebBrowser.LoadFromStrings('<html><body style="background-color:#2f2f2f"></body></html>',''); However, it seems that the webpage is not rendered if TWebBrowser is not visible, resulting in a white page showing up instead of my HTML. So I figured if this is a limitation, I'll just have TWebBrowser visible and cover it by a TRectangle, however that didn't work either as it seems (at least under windows) that the TWebBrowser control is always on-top. I also tried to placing the TWebBrowser control into a TPanel to see if that would allow it to be overlaid by other components, but it didn't make a difference. Finally I tried utilizing the "OnDidFinishLoad" event, but it didn't help either, a white page would still flicker for a split second before the page was rendered. Is there some other trick I haven't thought of that will allow me to first render the page in the background and only then show it so I don't have a flashing white box appear for a second before the page renders?
  5. I just looked at FGX, it doesn't look like it supports an alternative to TWebBrowser. And I would like to stick with Delphi, I have developed a lot for it and have a lot of pre-built support code that allows me to quickly prototype. Otherwise I would have already moved to ReactJS, Kotlin or Flutter as you mentioned.
  6. How does Flutter relate to Delphi?
  7. As part of a service I'm writing using mars, I'm exposing a sign-up page for users to sign up to the service. However, I want to prevent attacks on the service by bots and possibly detect multiple accidental clicks on the submit button. Right now the way I'm considering doing this is by keeping a list of IP addresses and verifying that only one sign-up per time-frame is allowed. I have two questions: 1. Using MARS, how do I read the client's IP address? 2. Are there other recommendations for defending mars?
  8. However, the above did not fully solve my problem, it would have been better if there was a way to get the IP from within functions that are called by mars in Server.Resources, otherwise I'm not sure how to connect the IP from Server.Ignition to an action in Server.Resources in a multi-threaded environment.
  9. I believe I figured it out, here's how to show a pop-up dialog with the IP address: In "Server.Ignition.pas" CreateEngine, I added : FEngine.OnBeforeHandleRequest := function (AEngine: TMARSEngine; AURL: TMARSURL; ARequest: TWebRequest; AResponse: TWebResponse; var Handled: Boolean ) : Boolean begin Result := True; ShowMessage(ARequest.RemoteIP); end; And also had to add "MARS.Core.URL, Web.HTTPApp" to the "uses" section.
  10. I'm using ISAPI, not Indy for the server-side code, so I can't get the IP the way you suggest. I'm hoping for a more generic approach that will work in all MARS output modes (stand-alone application EXE, ISAPI, etc)
  11. Maybe one of the MVPs knows a way to do this by leveraging the underlying java code? I need the UI to look sleek and a blank white screen transition sorts of gives a clunky vibe.
  12. I am using Rio, doesn't seem to help with my issue.
  13. You should also be aware that disabling hardware acceleration can harshly impact battery usage for your app.
  14. I'm not sure you can really disable hardware acceleration as FMX for Android relies on the GPU canvas which is OpenGL hardware accelerated. But seriously though, OpenGL hardware acceleration has been built into smartphones for well over 5 years, so even old phones have it. Not to mention you would have to use Delphi v10.2 or older to even support versions of Android older than v5 and you won't be able to upload these apps into the app store because they don't support the Android SDK google is requiring to upload new apps to the store (not to mention the 64bit issue).
  15. I also tried having the TWebBrowser visible off-screen by calling "WebBrowser.SetBounds(clientWidth,0,clientWidth,clientHeight)" and then returning it on-screen when the user clicks a button. On windows it works well enough (no white flash) but on Android I still see it flashing white for a split second.
  16. Yaron

    Any update on the v10.3.3 release?

    Since I've now reached a point where I must take action, I've done as you suggested, hopefully the process will be speedy.
  17. Yaron

    Any update on the v10.3.3 release?

    I'm aware of the beta, but like I wrote above, I would like to avoid wasting an entire work day installing & configuring a beta version of Delphi if the final release is just around the corner. And if it's not just around the corner then my subscription might end and I'll be stuck with a beta version. Like I wrote, no good options for me to plan for when no release information is forthcoming.
  18. Yaron

    Any update on the v10.3.3 release?

    Just got word from google that my 32bit project that was in beta would not be approved for the extension, not sure if it was because it was in beta or if I requested the extension too late. It's a shame that Embarcadero couldn't get the extension accepted all the way to the actual release date of v10.3.3. Now I'm stuck between a choice of two bad options: 1. Waste hours installing a beta version. 2. Wait an unknown period of time with the hope that a release will be out soon. All this while the clock is ticking on my subscription and without the ability to release anything for Android.
  19. I eventually created an auto-executing HTML form and used TWebBrowser.LoadFromStrings() to load the HTML and automatically login. I even made the login 'pretty' by having the form hidden and showing a logo with a CSS based "processing" animation. The end result looks smooth & professional.
  20. Yaron

    Any update on the v10.3.3 release?

    I'm wondering if there's a release date planned, I hate installing Delphi each time, takes a while to get everything re-configured on a clean install and doing in-place upgrades has been hit & miss for me.
  21. Yaron

    ISAPI DLL concurrent requests

    I'm doing something similar and encountered some of the same issues. 1. Since ISAPI is a DLL, did you add "IsMultiThread := True;" to let the memory manager know this DLL is using multiple threads (otherwise you can get random-seeming crashes)? 2. I'm not sure your logging code is thread safe, it might be useful to add a critical section to your log writes. 3. There should be no problem using global read-only variables across threads as long as these variables are not classes that do things in the background. 4. If you're accessing a database, make sure to use connection pooling. 5. Do you get a ~90sec freeze when trying to stop the application pool? Make sure to terminate the ISAPI dll correctly. This is my original thread in which the nice people of this forum helped me identify some of these issues:
  22. I believe I might be able login by using LoadFromStrings() to feed the html form and auto-activating JS to TWebBrowser with the form's action set to my login url, which will bypass the need to actually modify the html content.
  23. I have already written a Delphi ISAPI DLL that hooks into the microsoft IIS server and outputs HTML/JS/CSS. That part is done and working well in all browsers. Now, for convenience I would like to create a separate Android app (using Delphi) that uses the TWebBrowser component to open the web server's URL and automatically log-in by filling in the html form fields (user/pass) and press the "submit" button. With this second part I'm struggling since I don't know how to get to the HTML content displayed by the TWebBrowser component and how to trigger the form's "submit" button.
  24. I'm not sure I understand you, do you mean to write the Android app in ReactNative instead of Delphi? I don't have any experience with ReactNative, that's why I'm trying to use Delphi to simply wrap the html generated by my back-end code in a TWebBrowser component.
  25. The Delphi back-end is already rest-based, but the whole point of using HTML/JS for the front-end is to avoid having to design the UI for each platform (web/desktop/android) and rely on CSS to style the UI for every device without having to deal with device resolution/scale within Delphi code.
×