Jump to content

John van de Waeter

Members
  • Content Count

    83
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by John van de Waeter

  1. John van de Waeter

    Android 13 ask permission for push notification

    I did, the procedure was invoked, 1 GrantResult, but there was no dialog from Android to ask the user for permission. And it was NOT granted.
  2. John van de Waeter

    Android 13 ask permission for push notification

    Hi Dave, This I tried too, but the inner procedure (if AGrantresult[0]... ) is never called. Also weird that requesting permission to RECEIVE push notifications is calles POST_NOTIFICATIONS...
  3. John van de Waeter

    Android 13 ask permission for push notification

    I tried that, but Where 'XXXXXXXX'= ? Post_notifications is not a member of this class it seems?
  4. John van de Waeter

    ANN: Skia4Delphi v3.4.0

    Hi Vfbb, I installed skia4delphi a couple of months ago, (not via GetIt) and I'm not sure if it's the latest version. Where can I see the installed version number? Tnx, John
  5. Hi All, I have an Indy tcp client and Indy tcp server, all working great. Yet I would like to reduce the connection time The "protocol" is as follows: Clients Connects Client sends size of idBytes (write Int32) Clients sends encrypted data (idBytes) containing command or question. Server receives and prepares answer Server encrypts answer Server sends size of answer (IdBytes, write int32) Server sends data (idBytes) Every sending of a packet induces radio-transmissions which have a long latency compared to a wired connection. When I download a picture I use on serverside: ... AContext.Connection.IOHandler.Write(astream,astream.Size,false); ... and on clientside: ... TCPClient.IOHandler.ReadStream(astream, -1, True) ... This sending and receiving of a stream has the possibility of specifying the size of the stream in the first bytes. My question: is it possible to send a TIdBytes with the size included? So the receiving end knows how many bytes to read, just like when using a stream? It would save one extra radio latency. Thanks in advance, John
  6. John van de Waeter

    How to know how app was started

    Hi All, The phone (iOS or Android) receives a push notification. The user taps the notification and the app is started or brought to front. It's nice behaviour if the app responds according to the notification. How to know if the app was started / brought to front via a tap on the notification? cheers, John
  7. John van de Waeter

    iOS, Metal, Bitmaps, RGB becomes BGR?

    Hi All, I use Metal in a iOS FMX project like: if TUIScreen.Wrap(TUIScreen.OCClass.mainScreen).nativeScale=TUIScreen.Wrap(TUIScreen.OCClass.mainScreen).Scale then begin GlobalUseMetal:=true; GlobalEventDrivenDisplayUpdates:=false; GlobalPreferredFramesPerSecond:=60; end; I use Media-Camera action TakePhotoFromCamera OnDidFinishTaking and assign the bitmap to a TImage.Bitmap. This used to work okay, but now on Delphi11 it produces an image in which Red and Blue are interchanged. Same thing happens if I paste an image from the clipboard. Same thing happens if I get an image from the gallery. Image.Bitmap.Loadfromfile('animage.jpg') and dito .png works okay. If I turn off Metal, all is okay. Tested on iPhone5 and iPhone8. Any thougts? tia, John
  8. John van de Waeter

    iOS, Metal, Bitmaps, RGB becomes BGR?

    Thanks VFBB, I'll give it a try! :)
  9. John van de Waeter

    iOS, Metal, Bitmaps, RGB becomes BGR?

    Hi VFBB, What is the minimal Android version supported? On Android 6 I get an OpenGLES error (3009)... Cheers, John
  10. John van de Waeter

    TLocationSensor on Android 12

    Yes, Thanks Marc! :)
  11. John van de Waeter

    iOS, Metal, Bitmaps, RGB becomes BGR?

    Sjordi, yes, I did.
  12. John van de Waeter

    iOS, Metal, Bitmaps, RGB becomes BGR?

    Done 🙂 I'm always modest and reluctant before reporting an issue, cause most of the time it turns out to be my mistake....
  13. John van de Waeter

    D11, Android new App Billing Service

    Hi All, I have a nice Android app, developed in D 10.4.2, which includes In-App purchases. It runs on Android 6 and above. 1. The new Delphi 11 says the Android app will run on Android 8 and above. This would be bad news for my cutomers with Android 6 and 7 2. Google says per november 2021 the new app billing service needs to be used. Unless this new app billing service could be used by Delphi 10.4.2, I'm forced to use D11 but that would be bad news for (see above). It would be nice if either - D10.4.2 could handle te new Billing Service, so I could service those oldAndroid clients for say another year or - D11 can be used to create Android apps for Android 6 and 7. I guess there's a little more to it then just changing the minSDKVersion? Any tips? Greatly appreciated! tnx, John
  14. John van de Waeter

    idHttp Windows ConnectTimeout

    Hi All, My PC is always on. Except for today, I needed to check hardware and had to coldboot my computer. Ofcourse there were some windows updates that jumped in. Ok, Ok, All Ok. Windows booting, all seems okay, I start my D11-FMX project, F9 execute The project asks a server for updated info via HTTP. Via an idHttp. That has worked for years flawlessly, but now timed out. Weird. Browser worked ok, ip4 and ipv6 enabled, all seems ok. Compile and run on Android, everything works as expected. Same for iOS. I took a USBdrive and copied the Windows executable to a laptop that had not been switched on for weeks. On the same LAN. Everything worked like a charm. So, it's likely something in my computer. Switched off all apps/internet and whatever protections are visible in the windows settings, rebooted several times., To no Avail. Windows updates maybe? Uninstalled update KB5007186 Everything works again! I cannot look inside the updates, no idea what's going on,
  15. John van de Waeter

    idHttp Windows ConnectTimeout

    Follow up: Upon a new reboot, Windows insisted to reinstall KB5007186 And now the IdHttp connects flawlessly... So probably this KB was not the culprit.
  16. John van de Waeter

    D11, Android new App Billing Service

    Dave, Chris, I've first checked the Classes.dex with the jadx-tool, and all info I could find was about Billing version 4.0, so this looked okay. The Check in the Entitlements list was already there. Then I tried a new build to upload to the playstore with the meta-data line Dave mentioned included, and Voila, accepted without the warning! 🙂 I think you'd better file it to QC Dave, that will definitely draw more attention... Thanks for the help guys! John
  17. John van de Waeter

    D11, Android new App Billing Service

    Hi Chris, I tried. From a 10.4.2 project, I copied the sources to a new Alexandria directory. - removed all Android and iOS related files - removed the DProj and .dsk files - opened in D11`, reverting all library files to default Compile, install, run, test: NO PROBLEMS Upload to Google: Accepted, but with the same warning about the Billing Services: must use version 3 or higher. Appearantly my app doesn't meet the november 1 requierments... In the Libraries-section of the project I see billing-4.0.0.dex.jar though. Any idea how/where else to check for the correct Billing library?
  18. John van de Waeter

    D11, Android new App Billing Service

    Thanks Dave, Apart from some minor changes in my own code it seems to work...
  19. John van de Waeter

    iOS Metal and bitmap.savetofile

    Hi All, In a FMX IOS project, I turned on Metal to have a much more smoothly scrolling scrollbox. In project source: if TUIScreen.Wrap(TUIScreen.OCClass.mainScreen).nativeScale=TUIScreen.Wrap(TUIScreen.OCClass.mainScreen).Scale then begin GlobalUseMetal :=true; GlobalEventDrivenDisplayUpdates := true; GlobalPreferredFramesPerSecond := 60; end; Works great. But in another part of the same project, I have image1.bitmap.savetofile(docpath+'filename.png') This works okay if Metal is not used, but crashes if Metal is used. Delphi 10.4.1 Is this a bug or am I missing something? tia, John
  20. John van de Waeter

    iOS Metal and bitmap.savetofile

    Thanks Enesgeven I finally upgraded to 10.4.2 and it seems to be solved. Thanks for responding :) John
  21. John van de Waeter

    IOS deployment error [PAClient Error] Error: E0776

    Hyeong, what happens if you create a new, blank app? (just use the same name and provisioning as the original app)
  22. John van de Waeter

    IOS deployment error [PAClient Error] Error: E0776

    Most of my problems with deploying iOS apps disappeared when I: - deleted the IOSDevice directory - deleted the Launchscreen.TemplateiOS, - deleted Entitlement.TemplateiOS.xml - made sure every icon in project/Options has its own file and rebuild Not sure if this helps you though... I'm no iOS guru...
  23. John van de Waeter

    RAD 10.4 Android KeyboardType NumbersAndPunctuation not working

    Mateus, tnx, works like a charm 🙂
  24. John van de Waeter

    GeocodeReverse on Android

    Hi All, In my app I tried this sample to test Geocode Reverse, to find a location's postal code. Works great on iOS, but works only once on Android. (tested on Android 6 and 9). First time lookup Geocode reverse works, but subsequent lookups give the same result as the first one. Have to kill the app and restart to have a new lookup. I tried to dispose the TGeoCoder, so it would be recreated at every lookup, but it didn't have any effect. Any ideas? tia! John
  25. John van de Waeter

    GeocodeReverse on Android

    Found it, I guess... In System.Android.Sensors, class procedure TAndroidGeocoder.GeocodeReverseRequest The FGeoRevAddress was filled with data from the previous request. The code only fills the fields that are empty. So after one request, the fields where not empty and new data never got into the fGeoRevAddress. I applied just a quick fix for what I needed (city, postalcode, adminarea) of course this needs a more proper solution... 🙂 My quick fix: else begin Addr := FGeoRevAddress; Addr.adminarea:=''; // <--- added addr.postalcode:=''; // <--- added addr.locality:=''; // <--- added
×