bcvs
Members-
Content Count
11 -
Joined
-
Last visited
Everything posted by bcvs
-
Hi, I have to use an .jar file in my Android App. I've already created this bridge file and added the .jar as library as explained here: http://docwiki.embarcadero.com/RADSt...o_Android_Apps So far everythis is OK. Now I'm about to use the classes in my App. To start and to get into it I wand to call the function isNfcEnabled. The corresponding class looks like this in the bridge file: JCardlinkClass = interface(JICardlinkCallbackClass) ['{62BD9E24-88F0-4FD3-BD57-65479E39241E}'] {class} function _GetINSTANCE: JCardlink; cdecl; {class} function getDebug: Boolean; cdecl; {class} function getLogLevel: JLogLevel; cdecl; {class} function getSmsHack: Boolean; cdecl; {class} function getState: JCardlinkState; cdecl; {class} procedure initialize(string_: JString; iCardlinkCallback: JICardlinkCallback; string_1: JString; string_2: JString); cdecl; {class} function isNfcEnabled(context: JContext): Boolean; cdecl; {class} function isNfcHardwareAvailable(context: JContext): Boolean; cdecl; {class} procedure requestSmsToken(string_: JString; string_1: JString; string_2: JString; string_3: JString); cdecl; {class} procedure setDebug(b: Boolean); cdecl; {class} procedure setLogLevel(logLevel: JLogLevel); cdecl; {class} procedure setSmsHack(b: Boolean); cdecl; {class} procedure shutdown; cdecl; {class} procedure startScan(string_: JString; activity: JActivity); cdecl; {class} procedure verifySmsToken(string_: JString); cdecl; {class} property INSTANCE: JCardlink read _GetINSTANCE; end; [JavaSignature('de/...../Cardlink')] JCardlink = interface(JICardlinkCallback) ['{46B08D27-AA20-4A0D-971E-7405E46E0787}'] procedure onError(cardlinkError: JCardlinkError; string_: JString; cardlinkAction: JCardlinkAction); cdecl; procedure onPrescriptionBundles(list: JList); cdecl; procedure onPrescriptionTokens(string_: JString); cdecl; procedure onProgressUpdate(i: Integer); cdecl; procedure onStateChanged(cardlinkState: JCardlinkState); cdecl; end; TJCardlink = class(TJavaGenericImport<JCardlinkClass, JCardlink>) end; I think I have to create an instance of JCardlink first. What I tried: var CardLink: TJCardlink; CardLink:=TJCardlink.JavaClass.INSTANCE; // <-- Incompatible Types TJCardlink und JCardlink CardLink.JavaClass.isNfcEnabled(context); var CardLink: TJCardlink; CardLink:=TJCardlink.Create; // <-- Incompatible Types TJCardlink und JCardlink CardLink.JavaClass.isNfcEnabled(context); var CardLink: JCardlink; CardLink:=TJCardlink.JavaClass.INSTANCE; CardLink.JavaClass.isNfcEnabled(context); // <-- unknown identifier JavaClass CardLink.isNfcEnabled(context); // <-- unknown identifier isNfcEnabled It seems that I can only create an instance of JCardlink. But isNfcEnabled is a member of JCardlinkClass or TJCardlink.JavaClass. How can I get this together?
-
Thank you, that works. I was wrong when I thought, that I had to create in instance on TJCardlink as in this case it is a singleton.
-
Hi everybody from the documentation of an external SDK which I need to use in my app: Does anyone know what that means? What do I have to do to use this in Delphi 12? Is it possible at all?
-
It's CardLink. a solution for visualizing medical e-Recipes.
-
Hi everybody, I want my App to fire notifications with my own individual sound. When I read the documentation and different tutorials and forum posts this seems to be easyly done: Notification := NotificationCenter1.CreateNotification; Notification.EnableSound:=true; Notification.SoundName:= MySoundfile; But when I do so, Android uses still the default notification sound and under iOS I here nothing at all. On both platforms I can play the sound using the TMediaplayer. So I know that the Soundfile is present on the phone and that MySoundfile is correct. I use a mp3-File unter Android and a caf-File under iOS. Delphi is V12 Any Ideas?
-
Thank you for the hint with the channel but my first attempts were not succesful. What I did: (according to https://docwiki.embarcadero.com/RADStudio/Athens/en/Using_Notifications) - Deploy my soundfile notification.mp3 to remote path res\raw - Create a Notification channel: procedure TForm1.CreateDefaultNotificationChannel; var NotificationChannel: TChannel; begin NotificationChannel := NotificationCenter1.CreateChannel; NotificationChannel.Id := 'custom_notification_channel'; NotificationChannel.Title := 'Custom notification channel'; NotificationChannel.Description := 'Notification channel used for Firebase'; NotificationChannel.Importance := TImportance.High; // NOTE: This is a 'heads-up notification'. NotificationChannel.SoundName:='notification'; NotificationCenter1.CreateOrUpdateChannel(NotificationChannel); end; - This method is called once in TForm1.FormCreate. - Setting the default 'notification channel id' in the project options, Application - Services to custom_notification_channel Now the first problem: When I check the generated AndroidManifest.xml, I don't find a 'meta-data' declaration for custom_notification_channel. Do I have to add something to the AndroidManifest.template.xml? And the notification still play the default sound and not my notification.mp3
-
Hi everybody, After I was able to compile sample app AndroidNotificationServiceDemo I run into the next problem: In this example an android service is started, which sends a notification after 8 seconds. As long as the app runs this works fine. But when I stop the app within the 8 seconds using the android task manager, no notifcation appears under Android 14. I tested it on an older phone with Android 9. Here I see the notification even when the app ist not running, as i should be. Any ideas how I can get the notifications on Android 14?
-
Hi, I try to compile the embarcadero sample app AndroidNotificationServiceDemo. Theese errors occur, an a lot more: I get the same errors when I create a new project with an Android Service using this tutorial: http://docwiki.embarcadero.com/RADStudio/Sydney/en/Creating_Android_Services Any ideas what is wrong? I'm using D12
-
Hi everybody, I have a problem with an iOS project: My distribution certificate expired, so I edited the provisioning profile and created and choosed a new certificate. I downloaded the certificate an imported it into the key chain. When trying to build the app for distributing to the app store, I get this message: Certificate "Apple Distribution: <my name> (5U6K78G2E4)" not found in the provisioning profile "4af15d76-933d-45f6-a0bc-4f478c98c7e6". (or similar, it's in german here) What is strange: The certificate "Apple Distribution: <my name>" should not appear in this project at all. I work with two separate apple accounts: my own one and th one of my customer. This project should only the certificate "Apple Distribution: <my customer>". Delphi shows this correctly in the project options, provisnioning. The certificate <my name> (5U6K78G2E4) exists an is valid, but it should not be used here. How can I repair this?
-
Thank you, but meanwhile I found the reason. My settings in the project options were not correct. Under provisioning the correct developer certificate was missing. I didn't notice this before. So perhaps Delphi did choose a default or last-used certificate, which was the wrong one.
-
Hi everyone, I have a TTimeEdit in my App. In IOs the component shows theese scroll wheels for hours and minutes. So far OK, But now the scroll wheels appear at the bottom of the screen. When I tap on the the time to enter the time with the keyboard, as it it usual in IOs, the vitual keyboard appears an hides the scroll wheels and I can't go back. There is no chance to apply a time that is entered with the virtual keyboard. Do you have this problem as well? How do you deal with it.