-
Content Count
1613 -
Joined
-
Last visited
-
Days Won
37
Posts posted by Dave Nottage
-
-
3 hours ago, Halcon said:I can't find any method for save and get images that can view on the phone gallery
Since iOS 8, use the PhotoKit framework to access photos in albums:
PhotoKit | Apple Developer Documentation
I have an import for it, here:
https://github.com/DelphiWorlds/Kastri/blob/master/API/DW.iOSapi.Photos.pas
Which likely needs updating, because I think I imported it around iOS 9 era. This will not help you however, if you are saving photos as files somewhere. You can retrieve the filename from an asset in the gallery, bearing in mind can be traps in doing so:
https://medium.com/@slk11075/traps-for-phasset-how-to-get-filename-from-phasset-67d856e75c64
-
2
-
1
-
-
If you haven't already, try using a different cable
-
1
-
-
1 hour ago, Beppe Magistro said:these variables remain in red , may be are not more defined in
FMX.PushNotification.Android;
Are you actually including that unit in your source? If so, where you have declared it, please use Ctrl-Click or right-click and Open File At Cursor. It should find it in the Delphi source in the fmx folder. If it finds it anywhere else, that's probably the issue.
-
3 hours ago, Beppe Magistro said:up
You didn't answer my other question, i.e:
On 12/22/2020 at 11:39 PM, Beppe Magistro said:Have you checked to see if PushService is non-nil when executing this line?
ServiceConnection := TPushServiceConnection.Create(PushService);
-
37 minutes ago, zburns said:Attached a sample project that demonstrates the link
The test project:
Does not have "Secure File Sharing" checked in the Entitlements section of the Project Options,
Does not request the required permissions at runtime.
Fixing these makes it work for me on Android 11. -
17 hours ago, cellb9 said:I attempt to debug the app with target platform iOS Simulator 13.7
iOS simulator is currently not supported.
17 hours ago, cellb9 said:Any suggestions are greatly appreciated
Use a real device
-
3 hours ago, Alfredo Silvano said:The app sometimes fails to start and the debugger doesn't even execute the first line of code in the dproj file.
On Android, problems in deployment can cause the app to fail to start, however you have indicated it is also a problem on iOS, so it is more likely to be a problem with the initialization of one of the units included.
Can you create a blank app that runs OK? If so, use that, and start adding your original to the project until it breaks - then you have a reproducible example.
-
1
-
-
2 hours ago, Dave Nottage said:SetMaxImage and SetMinImage are not being called when the component is being loaded
Which is the whole problem - they're not called when the values are streamed. I needed to override the Loaded method to see that they are.
-
I have an FMX component with a published TBitmap property, but the property is not being read when the component is loaded (the other properties are).
Holger Flick's article suggests that it is possible: https://flixengineering.com/archives/166
Is there something special I need to do to make it work? This is what the declaration looks like:
TCustomNativeDoodad = class(TPresentedControl) private function GetMaxImage: TBitmap; function GetMinImage: TBitmap; function GetModel: TCustomNativeDoodadModel; overload; function GetValue: Single; procedure SetValue(const Value: Single); function GetOnValueChange: TNotifyEvent; function GetOrientation: TDoodadOrientation; procedure SetMaxImage(const Value: TBitmap); procedure SetMinImage(const Value: TBitmap); procedure SetOnValueChange(const Value: TNotifyEvent); procedure SetOrientation(const Value: TDoodadOrientation); protected function DefineModelClass: TDataModelClass; override; function RecommendSize(const AWishedSize: TSizeF): TSizeF; override; public constructor Create(AOwner: TComponent); override; property MaxImage: TBitmap read GetMaxImage write SetMaxImage; property MinImage: TBitmap read GetMinImage write SetMinImage; property Model: TCustomNativeDoodadModel read GetModel; property Orientation: TDoodadOrientation read GetOrientation write SetOrientation; property Value: Single read GetValue write SetValue; property OnValueChange: TNotifyEvent read GetOnValueChange write SetOnValueChange; end; [ComponentPlatformsAttribute(pfidiOS or pidAndroid)] TNativeDoodad = class(TCustomNativeDoodad) published property Align; property Anchors; property Height; property Margins; property MaxImage; property MinImage; property Orientation; property Position; property Size; property Value; property Visible default True; property Width; property OnValueChange; end;
SetMaxImage and SetMinImage are not being called when the component is being loaded
-
10 hours ago, Alfredo Silvano said:An example code may not be useful
If it reproduces the problem, it would be extremely useful.
-
10 hours ago, StephanWeber said:But now I got an iphone SE 2020. Can anybody compile the apps for this?
I assume you mean do the equivalent code for iOS?
-
4 hours ago, Alfredo Silvano said:Any suggestions?
See my first reply.
-
55 minutes ago, TrevorS said:active developer directory '/Library/Developer/CommandLineTools'
Which means you'll need to do:
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
-
2 hours ago, TrevorS said:I noticed that 10.4 had received a patch so I thought I'd create a fresh install (Windows and Delphi).
If you installed Delphi from scratch, you'll still need to apply the patches (there's 4)
2 hours ago, TrevorS said:However, I can't add an SDK for OSX ... nothing is displayed in the SDK manager.
In a Terminal window on the Mac, can you run this command?
/usr/bin/xcodebuild -version -sdk
In the output there should be at least one entry of MacOSX
-
8 hours ago, Beppe Magistro said:program hang when execute
What do you mean by hang? Have you checked to see if PushService is non-nil when executing this line?
ServiceConnection := TPushServiceConnection.Create(PushService);
-
7 minutes ago, Beppe Magistro said:TPushServiceManager.Instance.GetServiceByName(TPushService.TServiceNames.GCM)
Please pay attention to compiler warnings. TPushService.TServiceNames.GCM has been deprecated. Use TPushService.TServiceNames.FCM
-
39 minutes ago, ChrisChuah said:Error: file permissions do not allow debugging
Please see: http://docwiki.embarcadero.com/RADStudio/Sydney/en/Acquiring_Permission_to_Support_Debugging_on_a_Mac
Although that page needs fixing. The file in question is: dbkosx_27_0
-
9 hours ago, limelect said:Associated to button 1. So many it is usless
Either you posted the wrong source (a VCL app), or your question needs editing. It appears you wanted to replicate some Java code in Delphi.
-
2 hours ago, limelect said:It seems I do not succeed to duplicate this in Delphi 10.2
What have you tried? Does none of it succeed, or only certain parts?
-
Use a logcat viewer to check the log messages for any errors. Beyond that, you're going to need to give more detail about what is in the app, and perhaps a reproducible example if possible.
-
8 hours ago, meshael said:However, in my case, there are 20 different subfolders. And the remote path must match. So for each file I have to edit the remote path. It it still quite a bit of editing.
You could use Grijjy's DeployMan tool - it makes this process a lot easier. They describe it in this article:
https://blog.grijjy.com/2017/01/30/embed-facebook-sdk-for-android-in-your-delphi-mobile-app-part-2/
In the section titled "Add the resources to the Delphi Deployment Manager for your Android project"
-
21 hours ago, Martifan said:where can I download it?
Tools|GetIt Package Manager. In Categories, filter by Patches and Hotfixes:
21 hours ago, gioma said:I have installed the patch but nothing changes:
Unless the patch has been fixed by now, you need to also download the latest PAServer. Please see:
-
1
-
-
5 hours ago, meshael said:Where can I find some documentation on using Mosco
That's something I need to do. There's basic help for the "MonkeyBuilder" edition, and virtually zero for the "full" version which is in beta. I'll make sure I can help while working on some doc.
5 hours ago, meshael said:The install of Mosco itself was very nice and I can see some of the features there. I am excited to explore it.
The installer for Mosco itself actually just the standard .pkg format, created with the pkgbuild command: https://www.manpagez.com/man/1/pkgbuild/
I may look into using some of the options in order to make creating installers more customisable
-
1 hour ago, eg1 said:Cannot call Java instance methods called "init"
Were there any particular classes that apply to you for that bug?
1 hour ago, eg1 said:Apparent bug in linker (ld) when using Facebook Audience Network on iOS
Well, as you can see, I share your pain with that particular one 😉
Need help converting java instruction to delphi
in Algorithms, Data Structures and Class Design
Posted
Unlikely. Such tools are to create imports from .jar or .class files, not convert Java code to Delphi.
Your main problem will be whether OnPrintListener is a class or an interface, because you cannot implement a descendant of a Java class in Delphi - it needs to be done in Java. Java interfaces however, can be implemented in Delphi by creating a descendant of TJavaLocal, and implementing the interface in question. There are a number of examples of descendants of TJavaLocal throughout the Delphi source.
In order to determine what OnPrintListener is, you could use the aforementioned tools to import the Java classes from the .jar that you mentioned, assuming that it is the one that contains com.nexgo.oaf.apiv3.