Bart Kindt
Members-
Content Count
38 -
Joined
-
Last visited
Everything posted by Bart Kindt
-
Android Foreground Server location access blocked
Bart Kindt replied to Bart Kindt's topic in General Help
@programmerdelphi2k: Sorry, I must be blind. The android.permission.ACCESS_BACKGROUND_LOCATION has fixed my problem. Big thanks to both of you! Bart. -
Android Foreground Server location access blocked
Bart Kindt replied to Bart Kindt's topic in General Help
Re Dave: Got your reply after replying myself. I will go through the Kastri code and see how they do it. Funny thing is, nowhere else do I find any reference to android.permission.ACCESS_BACKGROUND_LOCATION I cannot see it anywhere in the Android documentation. I must be looking at the wrong place... -
Android Foreground Server location access blocked
Bart Kindt replied to Bart Kindt's topic in General Help
Uh, I have never heard of " LLocationForegroundPermission and I cannot find any references to it. I am using this during runtime: // cPermissionLocation = 'android.permission.ACCESS_FINE_LOCATION'; try TPermissionsService.DefaultService.RequestPermissions([cPermissionLocation], LocationPermissionResultHandler, DisplayLocationRationale); except on E:Exception do; // snip end; Is there a special "android.permission.(LocationForegroundPermission?)" Thanks, Bart -
Android Foreground Server location access blocked
Bart Kindt replied to Bart Kindt's topic in General Help
Yes,I read all this. But this is a FOREGROUND service. Which is different. And it should work, but it does not. Because of this 'end-user' option of this "allow all the time" which is A) not available during initial installation and B) If it is not set, I don't know about it and C) if I DO know about it, I have to talk the end-user through all the steps to fix it and D) even then after a certain amount of time, the OS may disable it again because the App has not been used for some time. Which happens all the time in my case, because the App is used for Search and Rescue purposes only, and there could be months between a SAROP. There must be some way around this. -
delphi Virtual Listview does not work because 'un-select' is not reported
Bart Kindt posted a topic in Windows API
I have a unit which tries to use the TListView in Virtual mode, by setting OwnerData to true. Theroretically all this should simply work, as long as I monitor the OnData, OnSelectItem, OnDataStateChange and possibly OnChange. But what happens, it that all 'OnSelect's are reported by Windows, but NOT all 'unSelect's. As a result, my VirtualItemList end up with more and more Selected Items, while in reality, there is (for example) only 1 Selected Item in the ListView. Below is an (Log) example of what happens: = I click on item 0: OnSelectItem: Item not assigned! OnChange: Index=0 Virtual Count=3001 Item=Caption 0 Selected=TRUE OnSelectItem: Item=Caption 0 Item.Selected=TRUE Selected=TRUE = I now shift-click on Item3, to multi-select all 4 Items: VirtualItemList.OnSelectItem: Item not assigned! *** OnDataStateChange: Start=0 End=3 *** OnDataStateChange: 0 Item: Caption 0 Selected=TRUE *** OnDataStateChange: 1 Item: Caption 1 Selected=TRUE *** OnDataStateChange: Changing VirtualItem Caption 1 to TRUE *** OnDataStateChange: 2 Item: Caption 2 Selected=TRUE *** OnDataStateChange: Changing VirtualItem Caption 2 to TRUE *** OnDataStateChange: 3 Item: Caption 3 Selected=TRUE *** OnDataStateChange: Changing VirtualItem Caption 3 to TRUE OnChange: Index=0 Virtual Count=3001 Item=Caption 0 Selected=TRUE OnChange: Index=3 Virtual Count=3001 Item=Caption 3 Selected=TRUE MouseUp: Base Selcount=4 Virtual=4 REAL=4 NOTE: - OnSelectItem is NOT called during 'Shift-Click' for the Selected items. - I now must use OnDataStateChange to Select these. - OnChange is ONLY called for Index 0 and 3. Not for the ones in between. = I now click on Item 4. (This should UN-select all other Items. It does do so on the screen...) OnSelectItem: Item not assigned! OnChange: Index=3 Virtual Count=3001 Item=Caption 3 Selected=FALSE *** OnChange: Caption 3 has changed to: FALSE OnChange: Index=4 Virtual Count=3001 Item=Caption 4 Selected=TRUE *** OnChange: Caption 4 has changed to: TRUE OnSelectItem: Item=Caption 4 Item.Selected=TRUE Selected=TRUE MouseUp: Base Selcount=1 Virtual=1 REAL=4 NOTE: - The OnChange only reported UNSelect for Item 3, and the Select for Item 4, but there is no event anywhere for Item 0, 1 and 3. - I now have FOUR Selected items in my Virtual List (The SelCount is hard overwritten from the ListView Selcount) - OnDataStateChange is NEVER called to report all the UN-Selects. The entire Test program source code can be downloaded here (200k): https://sartrack.nz/temp/VirtualListViewTest.zip I really wonder if it possible at all to do this, as this seems to be a Windows issue. Using Windows 10, Delphi 11. -
delphi Virtual Listview does not work because 'un-select' is not reported
Bart Kindt replied to Bart Kindt's topic in Windows API
Thanks all posters for the reference to VirtualTreeView, it is an amazing piece of work. -
delphi Virtual Listview does not work because 'un-select' is not reported
Bart Kindt replied to Bart Kindt's topic in Windows API
I think I tried this before, but I need a system which looks line ListView. I will have a look at it. But it must be free because my SARTrack Search and Rescue software system is free. -
delphi Virtual Listview does not work because 'un-select' is not reported
Bart Kindt replied to Bart Kindt's topic in Windows API
David: Are you prepared to email me (part of) your version of the 'Vitual List'? Also: What version of Windows and Delphi do you use? -
delphi Virtual Listview does not work because 'un-select' is not reported
Bart Kindt replied to Bart Kindt's topic in Windows API
I have now changed the way it works, as basically the whole system does not work at all as claimed. - OnSelectItem is only called during a single Select. It is NOT called during any UN-Select - OnSelectItem is NOT called during a multi-Select (Shift-Click, CtRl-Click). -- In this case, OnDataStateChange is called for the range of Selected Items (with a proper Begin and End count). - OnDataStateChange is NOT called when a range of Items is UN-Selected. The final result of this is, that the whole system is basically useless in its behavior. As mentioned by other posters, the only way to use it is: - On every OnSelectItem , completely Clear the entire milion+ Virtual listview, and then go through the *entire* milion+ TListViews and reset all Select's and UN-Select's. - On every OnDataStateChange , then process the selected Range (Begin to End) but ignoring the "OldState, NewState: TItemStates" which do not seem to have any effect. I can only hope that OnDataStateChange fully works in this case, because if it also cannot be trusted, then I would have to do a complete Clear and complete reload every time this is called... and it *is* called for example 100 times in a row if you select 100 Items with Shift-Click. I find all this quite unbelievable, considering it must have been like this for 25+ years if not more. And there is no reference about this bad behaviour in the Dephi or Windows documentation. Bart -
delphi Virtual Listview does not work because 'un-select' is not reported
Bart Kindt replied to Bart Kindt's topic in Windows API
Fr0sT.Brutal: So what alternative you have for the TListView? -
delphi Virtual Listview does not work because 'un-select' is not reported
Bart Kindt replied to Bart Kindt's topic in Windows API
No answer which helps, in StackOverflow. https://stackoverflow.com/questions/76399159/delphi-virtual-listview-does-not-work-properly The "OnSelectItem" *never* reports any UN-Select of items. And this is the problem here. -
I have a shortcut on my desktop to 'monitor.bat'. This stopped working. When I checked where it was pointing to, I discovered it still pointed to 20.0 So I located the 'monitor.bat' file in 22. And it still fails with an error message, pointing to a Log file. This Log file is unreadable to me. No idea what is going on. It starts like this: !SESSION 2022-10-03 07:35:23.052 ----------------------------------------------- eclipse.buildId=unknown java.version=11.0.15 java.vendor=Eclipse Adoptium BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_NZ Command-line arguments: -os win32 -ws win32 -arch x86_64 -data @noDefault !ENTRY org.eclipse.osgi 4 0 2022-10-03 07:35:23.839 !MESSAGE Bundle reference:file:org.apache.ant_1.8.3.v201301120609/@4 not found. !ENTRY org.eclipse.osgi 4 0 2022-10-03 07:35:23.986 !MESSAGE Bundle reference:file:org.apache.jasper.glassfish_2.2.2.v201205150955.jar@4 not found. And another 500 lines, then this: !ENTRY org.eclipse.osgi 4 0 2022-10-03 07:35:28.365 !MESSAGE Application error !STACK 1 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini). at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:74) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:353) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584) at org.eclipse.equinox.launcher.Main.run(Main.java:1438) What is is talking about? Everything worked fine in 11.1 ! Anybody, please help? Bart
-
Despite googling for this, I have not been able to find a recent solution to this; everything I fould either did not work at all, or the procedures called in examples do no longer exist in Delphi 11. I just want to open files in Shared directories using an existing application on the device, specifically Images, PDF's and possibly other Documents. Using Delphi 11. Thanks, Bart