-
Content Count
1495 -
Joined
-
Last visited
-
Days Won
36
Everything posted by Dave Nottage
-
What might those adjustments or extensions be?
-
As far as I'm aware, yes, however it seems Apple has relaxed the requirement until January: https://www.macrumors.com/2019/09/03/apple-macos-catalina-notarization-mac-apps/
-
Without a reproducible test case, it would be hard to tell. Some prudent adding of Log.d calls and use of the Console app (in /Applications/Utilities) might help find where it is crashing.
-
Incorrect: https://help.apple.com/itc/apploader/#/apdATD1E53-D1E1A1303-D1E53A1126
-
Without seeing all the code, it'd be hard to determine what is causing the issue.
-
Cannot get correct path to Documents folder on Android using Delphi 10.3
Dave Nottage replied to jon_bondy's topic in RTL and Delphi Object Pascal
On Android, TPath.GetDocumentsPath is, and has always been, the sandboxed (i.e. app specific) documents folder. If you wish to access the shared documents folder, it is TPath.GetSharedDocumentsPath. Prior to Delphi 10.3, the targetSdkVersion being used in the manifest was 19. In Delphi 10.3 the targetSdkVersion is now 28. From API level 21, applications that need permission for external storage (which is what TPath.GetSharedDocumentsPath points to), need to request permission at runtime. For an example of how to do this, take a look at this demo: https://github.com/Embarcadero/RADStudio10.3Demos/tree/master/Object Pascal/Mobile Snippets/ShareSheet Specifically in the TShareSheetForm.btnTakePhotoClick method in uMain.pas where permissions for external storage are requested. You don't need to request permission for TPath.GetDocumentsPath, so I have no idea why that folder is not working for you. Are you attempting to access files that are being deployed there (i.e. they have entries in Deployment Manager)? -
You're naming the labels as (for example): 'LabelTwo'+TButton(Sender).Name but you're calling FindComponent as: FindComponent('LabelTwo'+TButton(Sender).Tag.ToString) When it should be: FindComponent('LabelTwo'+TButton(Sender).Name)
-
I'd be more interested in how these are being created and free'd.
-
As long as it's just the background processes of the application you're interested in, you could use: https://developer.android.com/reference/android/app/ActivityManager#killBackgroundProcesses(java.lang.String) Since Android 2.2, you cannot close the entire application. You would probably do something like this (untested): uses Androidapi.JNI.JavaTypes, Androidapi.JNI.GraphicsContentViewText, Androidapi.JNI.App, Androidapi.Helpers; procedure Kill; var LService: JObject; begin LService := TAndroidHelper.Context.getSystemService(TJContext.JavaClass.ACTIVITY_SERVICE); if LService <> nil then TJActivityManager.Wrap(JObjectToID(LService)).killBackgroundProcesses(StringToJString('com.whateverpackagename.itis')); end;
-
You need to call Intent.setType with an appropriate type for email, e.g. plain/text message/rfc822 application/octet-stream If that still does not work, then there's probably no email client installed.
-
Error in iOS "file was built for which is not the architecture being linked (arm64)"
Dave Nottage replied to Francisco's topic in FMX
You have not added the MessageUI framework correctly, since it is appearing in "Other Paths", rather than "Frameworks". Please remove that entry and: Select an existing framework listed in the "Frameworks" section - this will ensure that none of the radio buttons are selected when the Add Remote Path item dialog shows Click the Add button In the Path on remote machine combo, enter: $(SDKROOT)/System/Library/Frameworks In Framework name, enter: MessageUI Click OK Click Update Local File Cache Click Save -
Error in iOS "file was built for which is not the architecture being linked (arm64)"
Dave Nottage replied to Francisco's topic in FMX
You'll need to show the code that's linking to the MessageUI framework. I expect it's attempting to link to MessageUI.tbd when it should be just MessageUI (i.e. no extension), and/or you've added the framework incorrectly to the SDK. -
I think that may be how I did it. I was unable to locate my old code.
-
Come to think of it, I did something like this back around the XE3 era and like you had to fight with it to make it work. Sadly, I may not have the code any more, but I'll take a look later just in case.
-
I'm using a VirtualBox VM with Android x86 ISO installed on it, which has the ability to bridge to ARM (using libhoudini). See my earlier replies.
-
You use a logcat viewer to view the logcat messages coming from the app. I have one called DeviceLens, which can be found here: https://github.com/DelphiWorlds/MiscStuff/blob/master/Test/DeviceLens.zip You may find that the Processes list does not populate (still bugs to iron out), however you should be able to press the "Play" button and watch the messages, as well as filter on text or the application package name (type it in to the package name edit and hit enter). In the Android VM, if you go to settings, there may be an entry named Android x86 Options (just after the Sound option). Tap that, then enable the Enable native bridge option (i.e. bridge from x86 to ARM). Then run Terminal Emulator (still in the Android VM) and run the following commands: su /system/bin/enable_nativebridge If you don't have the Android x86 options in Settings you may have to install a later Android x86 ISO. I used the latest available, from here: https://www.android-x86.org/ Sadly after doing all that, it still would not work for me. The app doesn't get past the splash screen, however it also does not crash. It might turn out different for you (I use VirtualBox)
-
If the IDE can "see" the device, are you able to use a logcat viewer to determine what the crash is?
-
What library are you using? Perhaps I can find a solution for you
-
You cannot, until this is fixed: https://quality.embarcadero.com/browse/RSP-10150 As per Loki's comment, one solution is to write Java code to wrap the class. Alternatively, you might be able to decompile the Java, modify the method name and recompile the jar in question.
-
Does this help? https://delphiaball.co.uk/2014/07/09/using-the-tlistview-to-select-multiple-items/
-
I have a demo of how to do this on macOS, here: https://github.com/DelphiWorlds/KastriFree/tree/master/Demos/macOSStatusBar It relies on files in the Kastri Free project: https://github.com/DelphiWorlds/KastriFree For Windows, use a TTrayIcon. I think there's plenty of examples around the internet of how to use it.
-
Additional info here: https://stackoverflow.com/a/3637349/3164070
-
If you're going to do any Android development that's even slightly outside of the scope of what's provided for you with Delphi, you need to at least have the basics for Java. I highly expect it is possible; it's a matter of knowing enough Java/Kotlin to be able to translate examples into Delphi code.
-
Rules for changing cursor to HourGlass and back
Dave Nottage replied to Mike Torrettinni's topic in Tips / Blogs / Tutorials / Videos
Consider if DoSomeLongProcess causes an exception.. what will happen to the cursor if there was no try..finally? Consider also if the cursor was something other than the default before you changed it to an HourGlass? Should you restore it to default, or to what it was before you changed it?