-
Content Count
1490 -
Joined
-
Last visited
-
Days Won
36
Everything posted by Dave Nottage
-
Use OnCloseQuery in the main form, and prevent the main form from closing unless the "exit" form has already been shown. If it hasn't been shown, show it 🙂
-
Is it true that using FMX units will cause android apps to fail?
Dave Nottage replied to KMarb's topic in FMX
You cannot use FMX.xxx units in an Android service built with Delphi. See: https://quality.embarcadero.com/browse/RSP-17857 -
Your Android device does not support the selected target platform architecture
Dave Nottage replied to alogrep's topic in FMX
Some devices have 64-bit CPUs, but have Android 32-bit running on them. Easiest way to find out if this is the case for you is to download an app like this. On the CPU page it reports whether the device is running in 32-bit mode. -
Can Delphi 11 IDE handle debugging two Android phones at the same time?
Dave Nottage replied to Al T's topic in Delphi IDE and APIs
Fair enough - I'd first try 2 instances of Delphi as SwiftExpat has suggested (have you tried this?), otherwise if that's too problematic: the second instance running in a Virtual Machine. -
[Solved](Delphi 11) (Android 12) 32-bit Debug Segment Fault 11 (TFile.Copy?)
Dave Nottage replied to Al T's topic in FMX
More to it than that: Updating the label (or anything UI related) needs to happen in the main thread - see Rollo62's answer- 5 replies
-
- delphi
- alexandria
-
(and 3 more)
Tagged with:
-
Multiplatform Hello World error [PAClient Error] Error: E7688
Dave Nottage replied to alogrep's topic in FMX
Looks like you may be using a project created with an older version of Delphi. Please refer to: https://github.com/DelphiWorlds/HowTo/tree/main/Solutions/AndroidLibraries -
[Solved](Delphi 11) (Android 12) 32-bit Debug Segment Fault 11 (TFile.Copy?)
Dave Nottage replied to Al T's topic in FMX
I'd expect that behaviour if CopyData was running in a separate thread. It would not normally be an issue, otherwise.- 5 replies
-
- delphi
- alexandria
-
(and 3 more)
Tagged with:
-
Can Delphi 11 IDE handle debugging two Android phones at the same time?
Dave Nottage replied to Al T's topic in Delphi IDE and APIs
I doubt it is possible with one instance of Delphi. Might be better to explain why you need it - there may be an alternative. -
Keeping edit field in view when on-screen keyboard appears
Dave Nottage replied to KMarb's topic in FMX
There's this (outdated) article. The demo has moved to here, and it sorely needs another revisit 🙂 -
Your repo violates copyright, by including a near copy of System.Zip (apparently from an earlier version of Delphi)
-
Is there any reason why you can't download to an app-specific folder? There are a number of changes in Android 11 that make it difficult to manage storage in shared folders: https://developer.android.com/about/versions/11/privacy/storage Which would explain why you are having issues. If you're logging from an app, the easiest way is to use Log.d from the FMX.Types unit. You can view the log messages using a logcat viewer - I have one called Device Lens. In Delphi, there's a permission in the Uses Permissions > Signature section of the Project Options called "Request install packages". Even with that checked, the OS might request approval from the user.
-
This is a complete routine that should work: procedure OpenApplication(const AFileName: string); var LMimeType: JString; LIntent: JIntent; begin LMimeType := TJMimeTypeMap.JavaClass.getSingleton.getMimeTypeFromExtension(StringToJString('apk')); LIntent := TJIntent.JavaClass.init(TJIntent.JavaClass.ACTION_VIEW); LIntent.setDataAndType(JFileToJURI(TJFile.JavaClass.init(StringToJString(AFileName))), LMimeType); LIntent.setFlags(TJIntent.JavaClass.FLAG_GRANT_READ_URI_PERMISSION); TAndroidHelper.Activity.startActivityForResult(LIntent, 999); // 999 is just a random value - it won't matter what it is end; Note the extra line regarding FLAG_GRANT_READ_URI_PERMISSION.
-
Sorry.. missed a step. Delete AndroidManifest.template.xml in the project folder. The IDE will recreate this. If you have made any customisations to it, you will need to ensure you reinstate those after it is recreated.
-
This should be: Intent.setDataAndType(JFileToJURI(F)), StringToJString('application/vnd.android.package-archive')); JFileToJURI uses the FileProvider class to create the correct URI You won't need to do that if you check the Secure File Sharing option in the Entitlements List in the Project Options. This also creates and deploys the required xml file.
-
Their blog site appears to be still alive: https://components4developers.blog ..and Kim is still posting on Twitter (at least less than 2 weeks ago): https://twitter.com/comp4dev
-
Delphi 10.4.2 won't open a specific .PAS file
Dave Nottage replied to MJBComp's topic in Delphi IDE and APIs
How big is the file? It might have some odd characters in it that the IDE cannot handle? Or maybe some peculiar structure? For the characters problem: try loading it in Notepad, make a minor change, then save it, then load it in Delphi again. -
You do not indicate what library you are using. Is it this one (or similar)? https://github.com/jimmckeeth/FireMonkey-Android-Voice Where you have "impossible to do something", you do not indicate exactly what it is your code is doing. Nor do you show what it is doing in the timer handler. Given that code executes, it's quite possible that the SpeechRecognition1Recognition event is executing outside of the main thread, which may account for the other issues you are seeing. If that is the case, you could use a construct like this: procedure TForm1.SpeechRecognition1Recognition(Sender: TObject; Guess: string); begin TThread.Synchronize(nil, procedure begin G_Heard := Guess; // Execute your other code, here end ); end;
-
Get copyright info from code in macOS
Dave Nottage replied to Nicolò Blunda's topic in Cross-platform
It seems it is not included by default in macOS apps produced by Delphi. When it is included, you could use the following code: Value := NSStrToStr(TNSString.Wrap(CFBundleGetValueForInfoDictionaryKey(CFBundleGetMainBundle, StringToID('NSHumanReadableCopyright')))); -
HELP: How to build blank Android App with trial Delphi 11
Dave Nottage replied to vladvash's topic in Cross-platform
It looks like a JDK compatibility issue. Start with showing what your Java settings are in Delphi, i.e. Tools | Options, Deployment > SDK Manager, select the relevant Android SDK, and select the Java tab. Mine looks like this: -
MacOS: How to remove ambiguous Developer ID certificates?
Dave Nottage replied to Alexander Halser's topic in Cross-platform
As ginnix suggests, this is because the ambiguous certificates are in the Keychain on your machine. In the Applications/Utilities folder there is an application called Keychain Access. Run that, select the "login" keychain on the left hand side, and select the "My Certificates" tab. Delete all the ambiguous Developer ID certificates except for the one with the latest expiry date, by right-clicking each one and clicking "Delete" -
Tools > Manage Platforms
-
Alexandria - "Generate Android App Bundle file" not found in Options
Dave Nottage replied to AndreaM's topic in Cross-platform
It was a totally new app. I uploaded an .aab file generated from the IDE in App Store configuration. The keystore file was also generated in the IDE on the Provisioning Page. I did not have to do the things you described - I guess the IDE manages that?- 11 replies
-
- alexandria
- app bundle
-
(and 3 more)
Tagged with:
-
Alexandria - "Generate Android App Bundle file" not found in Options
Dave Nottage replied to AndreaM's topic in Cross-platform
Quite odd - I haven't had to to that (I submitted a release just over 2 weeks ago), and haven't heard of anyone else that has needed to, either.- 11 replies
-
- alexandria
- app bundle
-
(and 3 more)
Tagged with:
-
I'd be interested to know if it passes review.
-
There can be solutions; just that there isn't any included with Delphi. This is a potential starting point: https://developer.android.com/training/printing, though you will need knowledge of Java, and how to convert the code to Delphi. If you mean development tools other than Delphi, there could be solutions using those, however it may still require writing the same code as per the link mentioned above, i.e. it would be unlikely to be included with the development tool itself.