-
Content Count
1297 -
Joined
-
Last visited
-
Days Won
29
Posts posted by Dave Nottage
-
-
7 minutes ago, Vincent Parrett said:Try this
Already did
-
Just now, aehimself said:You’ll need TEdgeBrowser or something similar to actually render it for you
Yeah, I had considered that, but I'd prefer to avoid it.
-
I have some code that queries mvnrepository via HTTP, specifically looking for packages for Android. It essentially boils down to this:
uses System.Net.HttpClient; procedure TForm1.Button1Click(Sender: TObject); var LHTTP: THTTPClient; LResponse: IHTTPResponse; begin LHTTP := THTTPClient.Create; try LResponse := LHTTP.Get('https://mvnrepository.com/search?q=play+services+maps'); // for example // At this point, LResponse.StatusCode is 403 :-( // The same query works in regular browsers finally LHTTP.Free; end; end;
Except that recently, as per the comment, it now returns a 403 result, with this content (truncated):
<!DOCTYPE html><html lang="en-US"><head><title>Just a moment...</title><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=Edge"><meta name="robots" content="noindex,nofollow"><meta name="viewport" content="width=device-width,initial-scale=1"><link href="/cdn-cgi/styles/challenges.css" rel="stylesheet"></head><body class="no-js"><div class="main-wrapper" role="main"><div class="main-content"><noscript><div id="challenge-error-title"><div class="h2"><span class="icon-wrapper"><div class="heading-icon warning-icon"></div></span><span id="challenge-error-text">Enable JavaScript and cookies to continue</span></div></div></noscript></div></div>
..and is followed by a bunch of cryptic JavaScript.
If there was an API (such as REST), I'd use that, however there does not appear to be, and I haven't had a reply for my email to info@mvnrepository.com.
Any ideas as to how I might be able to handle it?
-
8 hours ago, JohnLM said:I am not sure what that means let alone, how to resolve it.
Complete error messages may help.
-
28 minutes ago, grantful said:Has anyone run into this problem ?
Not when using classes that parse the JSON (at least, properly), since they won't include the quotes (given your example). What code are you using to parse it?
-
29 minutes ago, JohnLM said:The VCL app is up and running, and the TetherDBClient compiles and runs on the mobile device, but there is no database showing and the two devices do not connect, that is, when I click on the [Connect] button on the mobile device
Same here. Not sure which method(s) it tries to use to tether in this case - I can take a deeper look later if no-one else answers beforehand.
-
3 hours ago, JohnLM said:C:\Users\Public\Documents\Embarcadero\Studio\22.0\Samples folder, the project is dated 8/23/2022 so there must be some updates made since.
You'll find some of the demos have been updated, at: https://github.com/Embarcadero/RADStudio11Demos
-
14 minutes ago, grantful said:I think i am missing something on how it works
Do you have AutoSize on the tab item set to False?
-
1 minute ago, alogrep said:Open an existing project, press DEL Key twice (to delete 2 letters) and the IDE goes fishing: keystrokes or mouse totally disabled.
Either there's a step missing between opening an existing project and pressing the DEL key, or it just doesn't happen for me.
-
On 7/25/2023 at 8:05 PM, AndrewHoward said:How do I get list bluetooth devices ?
If you mean devices that are nearby, there's at least one example in the demos, which I think includes this one:
-
I'm able to see this post:
https://www.delphipraxis.net/212223-natives-layout-unter-firemonkey.html
..and I'd like to access the files that Peter666 attached to the post, however I'm unable to register on the site. Is anyone able to help, either with registration (it says "wrong username or password", but I'm just registering), or access to the files?
-
14 minutes ago, JohnLM said:I just need to find a way to plug those values for the lat/long into a map somehow and have it plot my previous travel route onto a map in my app.
There's a demo on using TMapView and placing markers, here.
-
5 hours ago, mbest said:I get that, BT is now on the dangerous list but I can not find a way of fixing it.
Take a look at the ScanFilterServicesAdvData demo in the same folder, specifically TForm6.Button1Click in Unit6.pas. It shows how to request permissions, including the one you need.
- 1
-
On 3/2/2021 at 6:12 PM, TimStroobandt said:I'm looking to build a dialer replacement for the elderly. According to the android docs I need to create a service which inherits from InCallService.
I know it's been a couple of years, however I was going through my to-do list today and came across something that led me to your post. It seems with InCallService, it is expected that your app actually replaces the default phone app - is this a viable proposition for you? Regardless, I asked ChatGPT about the alternative, which is to monitor for incoming calls, and provide an alternative means of answering the call.
Are you still looking for a solution to this, and does the ChatGPT answer fit your requirements?
-
On 7/12/2023 at 6:10 AM, Dave Nottage said:The implementation I'm working on...
Is now live! https://github.com/DelphiWorlds/Kastri/tree/master/Demos/GoogleSignIn
- 1
- 4
-
14 hours ago, Patrick PREMARTIN said:and a link to Grijjy solution
Which is sadly out of date (applies to Delphi 10.2). The implementation I'm working on should work in Delphi 11.x, and is more simplified than the Grijjy's.
-
7 minutes ago, Patrick PREMARTIN said:You'll find the solution for google sing-in in https://github.com/DelphiWorlds/Kastri
I have imports there, however an implementation for Google Sign-In is still coming..
-
20 minutes ago, AlanScottAgain said:I'm trying to compile FB4D for ios. FB4D is dependent the JOSE library.
FB4D is also (according to the docs) dependent on linking static libraries for SSL, for iOS*. This is at odds with JOSE, which is dependent on dynamic linking. For it to work on iOS, one will need to be changed.
*This statement in FB4D seems odd: "The library files libcrypto.a and libssl.a must be deployed within the package". Statically linked files do not need to be deployed.You might also like to see this.
-
8 hours ago, hackbrew said:When I implement the OnSaveState event into my app (to read/write data to a stream) the user never returns to my app after closing the mapping app
It's possible it's because your app crashed. When switching back to it, does it appear as if the app is restarting?
I seem to recall OnSaveState being unreliable anyway due to it not being called at all if the app is "swipe closed" (I could be wrong). It might be more reliable to persist anything you need restored as soon as a change has occurred.2 hours ago, hackbrew said:On an app close or device power off/on, what happens to data in an on-device local SQLite table?
Using FireDAC, SQLite databases are by default in auto-commit mode, i.e. any changes should be saved immediately.
-
17 hours ago, Bart Kindt said:I cannot see it anywhere in the Android documentation. I must be looking at the wrong place...
https://developer.android.com/reference/android/Manifest.permission#ACCESS_BACKGROUND_LOCATION
-
I'm confused with your last reply: are you still receiving the error? Also, which version of Delphi are you using?
-
21 hours ago, Bart Kindt said:In addition, I see no way to detect (on startup) if this option is enabled, and as a result for most of my users, the system basically stopped working.
What can I do about this??
You should be able to detect whether they've granted "allow all the time" by using:
PermissionService.IsPermissionGranted('android.permission.ACCESS_BACKGROUND_LOCATION');
The CrossPlatformLocation demo in Kastri has logic to ensure the user is aware that it will work only if it is granted, starting from the RequestPermissions method, here. If they've already granted sufficient permissions, it just "falls through" to starting the location services.
-
On 6/29/2023 at 8:17 PM, RaelB said:Would you mind trying my app (RightNote), to see if it starts?
Crashes before anything at all is shown. This is from the event log:
Faulting application name: RightNote.exe, version: 6.1.1.0, time stamp: 0x645ac479 Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000 Exception code: 0xc0000409 Fault offset: 0x77945948 Faulting process id: 0x0x1598 Faulting application start time: 0x0x1D9ADE7EB1F95C8 Faulting application path: C:\Utils\RightNote\RightNote.exe Faulting module path: unknown Report Id: 32f9e65a-e8cf-4ed5-8bf2-af8598ebae0c Faulting package full name: Faulting package-relative application ID:
According to this, it's a "fail fast" exception. I assume from your original post you're using Delphi 10.4?
-
11 minutes ago, grantful said:My problem is when i click in an edit box to type the phones keybord covers the editbox and i can not see what is being typed.
There's a number of ways to achieve it, and most involve changing the position of the control, or more likely a control that contains it, since other controls will usually be included in the same "container". For example, you might have a label next to, or above, the edit. Having them both contained inside the same control means that the "container" should be moved "upwards" sufficiently so that the edit appears above the keyboard.
There is a demo here, that helps make all this close to automatic. Note that the demo uses code from the Features\VKObserver folder of the same repo. It's not perfect, however it is useful for most scenarios.
Querying mvnrepository
in Network, Cloud and Web
Posted
I've decided to go down this route - it has turned out easier than I expected, especially when using ExecuteJavascript to extract the relevant parts out of the HTML