Unable to pass Object [] type as parameter for method in Android AIDL

Here is the code:

package android.os;

import android.content.Intent;

interface IInterpreterService {
    int notifyChange(String rule_name, Object[] data);
    void getMonitor(in Intent intent);
}

Strange error:

Aidl: framework <= frameworks/base/core/java/android/os/IInterpreterService.aidl
frameworks/base/core/java/android/os/IInterpreterService.aidl:7 parameter data (2) unknown type Object
+3
source share
1 answer

AIDL only supports a limited set of types, and Object is not one of them. The spec also mentions Parcelable as a component in the List. To do this, you will need to determine your type in a separate AIDL. Details can be found here http://developer.android.com/guide/developing/tools/aidl.html

0
source

All Articles