Kamino 1 Posted September 24 (edited) Under Android 16 only (build BP3A.250905.014), the App crash when call the BindService : 09-22 11:18:52.956 10948 10948 E AndroidRuntime: FATAL EXCEPTION: main 09-22 11:18:52.956 10948 10948 E AndroidRuntime: Process: com.XX.YYY, PID: 10948 09-22 11:18:52.956 10948 10948 E AndroidRuntime: com.embarcadero.rtl.NativeDispatchException: Erreur d'invocation : méthode 'onServiceConnected(Landroid/content/ComponentName;Landroid/os/IBinder;Landroid/app/IBinderSession;)V' introuvable 09-22 11:18:52.956 10948 10948 E AndroidRuntime: at com.embarcadero.rtl.ProxyInterface.dispatchToNative(Native Method) 09-22 11:18:52.956 10948 10948 E AndroidRuntime: at com.embarcadero.rtl.ProxyInterface.invoke(ProxyInterface.java:20) ... The application already available in app stores was working, but since the system update and without any changes, it crashes. The Delphi location demo application with a service also crashes in the same way. Perhaps the problem is that the declaration is : void onServiceConnected(ComponentName name, IBinder service) instead of for Android API 36 : void onServiceConnected(ComponentName name, IBinder service, IBinderSession session) ? Does anyone else have the same problem, and if so, is there a solution? Edited September 24 by Kamino Share this post Link to post
Dave Nottage 644 Posted September 24 9 hours ago, Kamino said: Perhaps the problem is that the declaration is : void onServiceConnected(ComponentName name, IBinder service) instead of for Android API 36 : void onServiceConnected(ComponentName name, IBinder service, IBinderSession session) ? The message is telling you it cannot find a method with the latter signature. Somewhere in your code you have a declaration for that, rather than the correct one. Usually you would use TLocalServiceConnection to connect to a service. It seems you are using something else, because this is how TJavaServiceConnection (used by TLocalServiceConnection) is declared: TJavaServiceConnection = class(TJavaLocal, JServiceConnection) private [Weak] FLocalConnection: TLocalServiceConnection; public constructor Create(const ALocalConnection: TLocalServiceConnection); procedure onBindingDied(name: JComponentName); cdecl; procedure onNullBinding(name: JComponentName); cdecl; procedure onServiceConnected(name: JComponentName; service: JIBinder); cdecl; procedure onServiceDisconnected(name: JComponentName); cdecl; end; Which matches the documentation. There is no indication this has changed since API level 1. Share this post Link to post
Kamino 1 Posted September 25 (edited) 9 hours ago, Dave Nottage said: Le message indique qu'il ne trouve aucune méthode portant cette dernière signature. Votre code contient une déclaration à ce sujet, et non la bonne. Habituellement, on utilise TLocalServiceConnection pour se connecter à un service. Il semble que vous utilisiez autre chose, car voici comment TJavaServiceConnection (utilisé par TLocalServiceConnection) est déclaré : Ce qui correspond à la documentation . Rien n'indique que cela ait changé depuis le niveau 1 de l'API. Thank you for your reply. It's a wrong lead... But when I run the Delphi example, I get exactly the same error : 09-25 08:11:31.046 11597 11597 E AndroidRuntime: FATAL EXCEPTION: main 09-25 08:11:31.046 11597 11597 E AndroidRuntime: Process: com.embarcadero.ForegroundLocationApp, PID: 11597 09-25 08:11:31.046 11597 11597 E AndroidRuntime: com.embarcadero.rtl.NativeDispatchException: Erreur d'invocation : méthode 'onServiceConnected(Landroid/content/ComponentName;Landroid/os/IBinder;Landroid/app/IBinderSession;)V' introuvable 09-25 08:11:31.046 11597 11597 E AndroidRuntime: at com.embarcadero.rtl.ProxyInterface.dispatchToNative(Native Method) 09-25 08:11:31.046 11597 11597 E AndroidRuntime: at com.embarcadero.rtl.ProxyInterface.invoke(ProxyInterface.java:20) ... The problem appeared after installing an update : BP3A.250905.014 (Pixel 6) Do you have any leads for further research or additional tests to be carried out? Edited September 25 by Kamino Share this post Link to post
Dave Nottage 644 Posted September 25 1 hour ago, Kamino said: Do you have any leads for further research or additional tests to be carried out? I get the same issue that you do with that example project with my Pixel 6 Pro (Android 16). I think I had it the wrong way around - it seems it is looking for that method with that signature, but of course does not find it. What is more puzzling is that the IBinderSession type does not seem to exist, in any API level, and there are no references to it anywhere in the Delphi source (Java or Pascal) Right now I am at a loss as to what the cause is. Share this post Link to post
Kamino 1 Posted September 25 (edited) 30 minutes ago, Dave Nottage said: I get the same issue that you do with that example project with my Pixel 6 Pro (Android 16). I think I had it the wrong way around - it seems it is looking for that method with that signature, but of course does not find it. What is more puzzling is that the IBinderSession type does not seem to exist, in any API level, and there are no references to it anywhere in the Delphi source (Java or Pascal) Right now I am at a loss as to what the cause is. Hi Dave, Thank you for testing the problem, I feel a little less alone! I also submitted a request on the Embarcadero quality portal... The big problem is that all users who install the system update can no longer use the application at all. Edited September 25 by Kamino 1 Share this post Link to post
Dave Nottage 644 Posted September 25 (edited) 3 hours ago, Kamino said: I also submitted a request on the Embarcadero quality portal... I don't seem to be able to find it. Do you have a link? EDIT: Never mind.. found it 🙂 Edited September 25 by Dave Nottage Share this post Link to post