Jump to content

DelphiMT

Members
  • Content Count

    24
  • Joined

  • Last visited

Posts posted by DelphiMT


  1. I feel for you. I think a big part of the problem is that we lost a lot the developer community when Google shut down Google+ -- there was a pretty active Delphi group there, and while this forum is great, I don't think it has the reach of the old Google+ group. You might try posting on Reddit and Discord as well -- there's got to be someone out there who has solved this problem.

     

    I had a similar experience when making an Android app that uses Bluetooth -- much of the Delphi documentation was out-of-date, Stack Overflow wasn't very helpful, and a lot has changed in how you use Bluetooth in recent versions of Android. I do not envy the RAD Studio developers trying to maintain and keep up with 4 different platforms.

     

    • Like 1

  2. It's prob not relevant to your problem, but I've run into a similar issue were the debugging doesn't work on my company laptop, but does on my own PC. I use the same VirtualBox VM on both (I copy the VM files over), so the RAD Studio installation and all the project files are the same on both machines. In my case it's an Android app and I can set breakpoints etc on the company PC but they are just ignored and the app never stops at a breakpoint. The company laptop has a bunch of AV/anti-malware stuff on it so I just assume that's the cause.


  3. The customized manifest file is working for me (see the snippet in my previous post), but on Android 10 and earlier I still have this problem:

     

    1. App requests location permission at runtime, and the callback indicates that the permission is granted.

    2. App then tries to make a Bluetooth connection to the device I'm trying to control (it's a laser with a Bluetooth UART module), and that all works, EXCEPT, if the user has turned off location services, then the app isn't able to connect. In the code I can't tell if it wasn't able to connect because the laser isn't on, or if it's because location services are off.

     

    It seems like on Android 10 I can't make a Bluetooth connection unless location services are turned on? I guess even tho the system is telling me that the app has permission to use location (necessary to use Bluetooth on Android 10), it can't actually make a Bluetooth connection without it. My app doesn't need or use any location information -- I'm just using Bluetooth as a way communicating wirelessly with the laser and don't need (or want) to know any location info.

     

    I guess that on Android 10 I can check to see if location services are enabled or not and ask the user to turn it on if needed, but that makes it seem like my app is tracking their location. Anyone run into this issue or have suggestions?


  4. 13 hours ago, Rollo62 said:

    We have all the same goal in mind, but Apple does its best to keep this goal as far and impossible as it could be 🙂

    I'm afraid you have to work through all the docs and threads that are out there, all the time.

    This. It can often be an endless loop of installing macOS updates so that you can install a new version of Xcode, and then having to redo your provisioning, certs etc... Keychain Manager is your friend and will help root out outdated certs which can cause all sorts of problems.

     

    I usually budget at least a few days of work to sort it all out when updating the Xcode and RAD Studio tool chains, so don't expect it to be a plug-and-play operation -- it will be time-consuming and frustrating at times.


  5. I have an app that uses Bluetooth LE and here's what I had to do to get it working on Android 12 (and above), as well as Android 11 and earlier. I am using RAD Studio 11.2 Alexandria.

     

    1. Edit the AndroidManifest.template.xml file in the project directory to add a special entry for the BLUETOOTH_SCAN permission, so it looks like this:

     

    ....

        <uses-sdk android:minSdkVersion="%minSdkVersion%" android:targetSdkVersion="%targetSdkVersion%" />
        <!-- for this next line to work, uncheck the "Bluetooth Scan" from projects "uses" options  -->
        <uses-permission android:name="android.permission.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation" />
    <%uses-permission%>

    ....

    NOTE: this is just a snippet from the template file showing the line I added, with a comment line above it.

     

    2. In the project options dialog, edit the "Uses Permissions" section and remove the "Bluetooth Scan" option. This is necessary since that option is now already included in the manifest template, and if you select this option in the project options then RAD studio will add the bluetooth scan option to the output manifest, but WITHOUT the usesPermissionFlags attribute.

     

    I have no idea if this is the best way to workaround this issue, but it works for me. I've tested it on devices running Android 10, 11, 12, and 13.

     

    Hope this helps.

     

     

    • Like 1

  6. I've had good luck using it to write a GUI in Delphi which interacts with another program that was written in Python. I use sockets to communicate between the two processes, which has the added benefit of allowing the GUI to run on a different machine if needed, it could even be on a different platform. I've used this same architecture even when the program(s) are written in the same language. The MVVM structure works well for this -- I generally have the View (the GUI) send messages over the socket to the ViewModel, which then dispatches them to the appropriate Model. I use thread-safe queues and background threads for all the I/O so that the GUI is never blocked.

    • Like 2

  7. 1 hour ago, dummzeuch said:

    I have installed it on 8.1 too (and another installation on Windows 10). But since 4.1 isn't stable enough for me to use it in every day work, I can't really say whether there are any Win 8.1 specific issues.

    That's disappointing.. I've been away from Delphi for a few months and was hoping things had gotten better with the new release. Which is the most stable recent version of Delphi in your experience?

     

    I need to compile 64bit apps for Android and macOS, I was under the impression that 10.4.1 was the only version that could do that.

     


  8. I just tried to install 10.4.1 on my Windows 8.1 virtual and got the error that RAD Studio no longer supports installation on Windows 8.1, but you can ignore the error and install anyhow. Has anyone else tried using 10.4.1 on Windows 8.1 -- if so, did you have any problems?

     

    I prefer to use 8.1 because I can control what Windows updates are installed.

     

    Thanks!


  9. I had issues similar to this when making an app that uses Bt LE on android. I'm traveling now and when I get home (in a few days) I'll dig out my notes and provide some examples of how I worked around this. My fuzzy recollection is that because Bluetooth can be used to infer someone's location, you have to have all the location permissions granted, and IIRC it seemed to matter that you do them in a certain order.


  10. Just another data point and word of warning to others:

     

    I've tried to publish a bug-fix update to one of my apps (it's been on the Play Store for several years already), and so far I've gotten two emails from Google -- one asking for more information on why I'm not 64-bit compliant (I already told them I'm using RAD Studio which doesn't support 64bits yet, so I'm not sure why they had to ask again), and then today I got another email saying they are reviewing it further -- so it seems like just saying you are using RAD Studio is not enough of a reason. The whole process has taken 2 weeks so far, and in the meantime our users can't get the bug fix.

     

    Initially I tried to publish the bug fix as a beta version and requested an exception for that, but never heard anything back from Google, so apparently they are only looking at exception requests for full production releases, which doesn't really make sense since I'd really like to publish it as a beta first before pushing it out to production. Argh!!!

     


  11. On 3/8/2019 at 11:41 PM, philipp.hofmann said:

    I was able to use Delphi+BLE only in combination with MacOSX Sierra (or older) but not with High Sierra or Mojave -> this means it's not useable in my use case. If you know how I can use Delphi+BLE also with Mojave I'm extremly interested.

    I'm using High Sierra. It may depend on what "flavor" of BLE you need to use. In my case I'm using the UART over Bluetooth service. I did end up using a USB Bluetooth dongle because the built-in Bluetooth on my 2012 Mac Mini didn't work - maybe you are running into the same issue?


  12. 1 hour ago, philipp.hofmann said:

    My software runs with all OS (Win32/Win64/MacOS/iOS/Android/Linux [fmxlinux]) but with MacOS the Delphi-BLE-implementation is not useable.
    P.S.: With Linux BLE is also not useable but there isn't any BLE implementation until now, under MacOS is an error in the existing BLE implementation.

    While do you say BLE is not usable? I have an app available on both Apple and Google stores that runs on Mac, Windows, iOS, and Android, and uses BLE to control an industrial laser. I've had problems getting it to work with Windows, but it was easy to get it working on iOS, Mac and Android.


  13. Most of these issues were reported during the beta phase, so it must be an issue of priorities and they didn't feel that these bugs were worth holding up the release. It sure makes me think that the future of software development is to use open-source tools so that the community can have a role in the development. I know this is becoming the norm in many other communities. Microsoft is making big strides in this area.

     

    Maybe it's time for me to revisit Lazarus/Open Pascal.

×