Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unable to overload method in AIDL interface

Tags:

java

android

aidl

I am unable to overload a method in the AIDL interface.

I wanted to have 2 functions with the same name but diffrent number of arguments like this:

boolean callMethod(in String pClass, in String pMethod, in String pParam);
void    callMethod(in String pClass, in String pMethod);

when I do so, I get an error saying "attempt to redefine method callMethod"

Regards,

like image 794
Rajan Avatar asked Aug 13 '12 10:08

Rajan


1 Answers

AIDL does not support overloading. I did not see any mention of this in the documentation, but Google did clarify this point in the android-platform forum here. You can add new methods to the bottom of your AIDL interface without breaking compatibility.

like image 91
Jim Vitek Avatar answered Oct 05 '22 01:10

Jim Vitek