Jump to content

Dave Nottage

Members
  • Content Count

    1495
  • Joined

  • Last visited

  • Days Won

    36

Everything posted by Dave Nottage

  1. Does this have anything to do with it? https://devzone.paylane.com/api-guide/cards/card-data-storage/
  2. Dave Nottage

    Saving registry keys

    I receive: [Window Title] Project1 [Content] Could not save: A required privilege is not held by the client [OK] Which is odd, since SetTokenPrivilege succeeds. Using Delphi 10.3.2
  3. Dave Nottage

    Unable to install app after package name change

    Ah, thanks. Here was me thinking that it used domain name rules.
  4. Dave Nottage

    Unable to install app after package name change

    That's very odd, since it's perfectly valid. I'd report it to Google.
  5. Dave Nottage

    64bit testing hardware/emulation

    I have a Pixel 3a running in 64-bit mode with 4GB of RAM.
  6. Dave Nottage

    64bit testing hardware/emulation

    You don't think what? Neither of us made any claim otherwise.
  7. Dave Nottage

    64bit testing hardware/emulation

    Yaron didn't mention a requirement of > 4GB memory; he was talking about devices with 64-bit processors. Most devices manufactured since late 2014 are 64-bit, so choose one that was made since then, but always check by Googling the device info. It would be very unusual for a 64-bit device with Android 5 or greater to have a 32-bit version of Android.
  8. Dave Nottage

    Unable to install app after package name change

    Further to my last reply: I've wrapped up the functionality into my Device Lens tool in version 1.1.0 beta. If you use Slack and join my Slack team at this link: https://slack.delphiworlds.com/ (If you have not already joined), go to the #DeviceLens room where I've uploaded a zip of the executable, as well as a couple of notes on how to retrieve the application label.
  9. Dave Nottage

    Unable to install app after package name change

    It means you have another app on the device that is using the same package name, that was signed using a different key (usually using a different version of Delphi). If you're unsure as to which one it is, one way to check is to use adb, which is in the platform-tools folder under the Android SDK root, so change directory into there, and run this: adb shell pm list packages -f <yourpackagename> e.g: adb shell pm list packages -f com.embarcadero.Location Example output: package:/data/app/com.embarcadero.Location-7NS38JcbdfTgvZ3_WPSj-w==/base.apk=com.embarcadero.Location The part after "package:" and before "=<packagename>" is the path to the APK. Pull the package to the PC, e.g: adb pull /data/app/com.embarcadero.Location-7NS38JcbdfTgvZ3_WPSj-w==/base.apk C:\Temp Then use aapt (in the build-tools\<version> folder under the SDK root, where <version> is whatever version you're using) to discover the application label, e.g: aapt dump badging C:\Temp\base.apk | grep application-label Example output: application-label:'Location'
  10. Dave Nottage

    Android, how to call a TJIntent

    On deployment, the <%provider%> tag is either replaced with provider information for secure file sharing, e.g: <provider android:name="android.support.v4.content.FileProvider" android:authorities="com.embarcadero.Test.fileprovider" android:exported="false" android:grantUriPermissions="true"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/provider_paths" /> </provider> or it is simply removed. If you're expecting the former, please ensure that you have Secure File Sharing checked in the Entitlements section of Project Options for the configuration you are building for (i.e. Debug and/or Release)
  11. Dave Nottage

    [iOS] XCode 11 iPhone iOS13.2 preparing debug image

    Pretty sure Delphi can at least deploy to iOS 13.2 devices using Xcode 11.2 beta. I know for sure that Delphi 10.3.2 cannot debug for iOS 13.2 devices, though.
  12. There's no "easy" way to cater for older versions, whether it's iOS, macOS or Android. The best you can do is check the API documentation for which version the methods were introduced (or removed) and use TOSVersion.Check to determine whether the code is relevant and can be called, and branch to another part of the code if you need to cater for lower versions. There's a bunch of examples of TOSVersion.Check being used in the FMX code, so you could refer to them.
  13. Dave Nottage

    Mac address on Android 6.0 or above

    1. This should at least have you started: uses Androidapi.JNI.Java.Net, Androidapi.JNI.JavaTypes, Androidapi.Helpers, Androidapi.JNIBridge; function BytesToHex(const ABytes: TBytes): string; var I: Integer; begin Result := ''; for I := Low(ABytes) to High(ABytes) do Result := Result + IntToHex(ABytes[I], 2); end; procedure GetMacAddresses(const AAddresses: TStrings); var LInterfaces, LAddresses: JEnumeration; LInterface: JNetworkInterface; LJavaBytes: TJavaArray<Byte>; LBytes: TBytes; LByte: Byte; I: Integer; LAddress: JInetAddress; LName, LHostAddress: string; begin AAddresses.Clear; LInterfaces := TJNetworkInterface.JavaClass.getNetworkInterfaces; while LInterfaces.hasMoreElements do begin LInterface := TJNetworkInterface.Wrap(JObjectToID(LInterfaces.nextElement)); LJavaBytes := LInterface.getHardwareAddress; if LJavaBytes <> nil then begin SetLength(LBytes, LJavaBytes.Length); for I := 0 to LJavaBytes.Length - 1 do LBytes[I] := LJavaBytes.Items[I]; AAddresses.Add(BytesToHex(LBytes)); end; end; end; 2. Check the code (and warning) for GetUniqueDeviceID, here: https://github.com/DelphiWorlds/KastriFree/blob/master/Core/DW.OSDevice.Android.pas Apparently things have changed a little since Android 8: https://developer.android.com/reference/android/provider/Settings.Secure.html#ANDROID_ID
  14. If you're using Bluetooth for tethering, it's more than likely due to needing to request permissions for location at runtime, as Bluetooth discovery requires one of them: https://developer.android.com/guide/topics/connectivity/bluetooth#Permissions There's an example of how to do this in this demo: https://github.com/Embarcadero/RADStudio10.3Demos/tree/master/Object Pascal/Multi-Device Samples/Device Sensors and Services/Bluetooth/BLEScanner
  15. Dave Nottage

    Android, how to call a TJIntent

    Check the file AndroidManifest.xml in the folder: C:\Users\(username)\AppData\Roaming\Embarcadero\BDS\20.0 Where (username) is your logged in Windows username. This is the file that the IDE uses for AndroidManifest.template.xml. Part of the file should look like this: <%provider%> <%application-meta-data%> <%uses-libraries%> <%services%>
  16. It's a Delphi problem: https://quality.embarcadero.com/browse/RSP-26388
  17. Known issue. If you imported an iOS 12.x SDK from an earlier version of Xcode, target that for now.
  18. Dave Nottage

    Delphi Rio 10.3.2 : iOS Display Name

    Following exactly the same steps, from scratch?
  19. Dave Nottage

    Delphi Rio 10.3.2 : iOS Display Name

    Changed to: Bob Is A Developer Works OK. If it helps, my setup is: Delphi 10.3.2 iOS 12.4 SDK iPhone X running iOS 13.2 Xcode 11.1
  20. Dave Nottage

    Delphi Rio 10.3.2 : iOS Display Name

    Changing CFBundleDisplayName works OK for me. Here's my steps: 1. Create a blank FMX project 2. Save it as: Fred 3. Compile/Deploy to iOS device - it appears as "Fred" 4. Change CFBundleDisplayName from $(ModuleName) to: Bob 5. Compile/Deploy to iOS device - name changes to "Bob"
  21. Dave Nottage

    WebBrowser File Upload

    Looks like you'll need to file an enhancement request, at: http://quality.embarcadero.com The later answers at this link: https://stackoverflow.com/questions/5907369/file-upload-in-webview Have suggestions as to how it should be implemented; the important part being that the WebView descendant needs to implement openFileChooser.
  22. Dave Nottage

    Any update on the v10.3.3 release?

    Please email Calvin Tang at Embarcadero. His email address is the usual pattern, i.e. firstname.lastname@embarcadero.com
  23. Dave Nottage

    WebBrowser File Upload

    A reproducible test case might help.
  24. I wouldn't rely too much on a repo that infringes Delphi source copyright
  25. Dave Nottage

    Unit testing cross platform code

    Not entirely obvious from the FAQ etc: does TestInsight have some method of running tests on the device (or Mac machine) that are reported back to TestInsight in the IDE? Sorry if that's a stupid question 🙂 It may also be what Darian is interested in.
×