在AIDL文件中,如何传递List<int>参数呢?
比如:package com.test;void test(in List<int> list);
这样写 死活就是编译不过去。 如何传递List<int> 呢 而不是int[]; 求大神解答啊 感谢
Androidaidl

解决方案 »

  1.   

    你先看看文档吧,AIDL不支持这种类型。
    支持的数据类型很少。
      

  2.   


    void playSoundEx(in List<SoundInfo> mSoundInfo,  String entry);
    我这样用  可以啊
      

  3.   

    http://developer.android.com/guide/components/aidl.html
    By default, AIDL supports the following data types:    All primitive types in the Java programming language (such as int, long, char, boolean, and so on)
        String
        CharSequence
        List    All elements in the List must be one of the supported data types in this list or one of the other AIDL-generated interfaces or parcelables you've declared. A List may optionally be used as a "generic" class (for example, List<String>). The actual concrete class that the other side receives is always an ArrayList, although the method is generated to use the List interface.
        Map    All elements in the Map must be one of the supported data types in this list or one of the other AIDL-generated interfaces or parcelables you've declared. Generic maps, (such as those of the form Map<String,Integer> are not supported. The actual concrete class that the other side receives is always a HashMap, although the method is generated to use the Map interface.AIDL支持List类型。