I have class X that implements Queue.
I want to pass Class X’s Object into AIDL interface. When i am importing class X in .aidl File Eclipse
shows an error and says “could not find import for
class com.test.X.” although the class is there.
package com.test
public class X implements Queue<byte[]>{
public LinkedList<byte[]> que = new LinkedList<byte[]>();
int push =0, pop = 0;
public Iterator<byte[]> iterate = null;
public X()
{
iterate = que.iterator();// TODO Auto-generated constructor stub
}
}
As searching around on Google i have found that You must create a separate .aidl file for each class you wish to use within your service.So, i have created X.aidl but it didnt work.
can any one suggest something?
Thanks.
Try to make your class implementing Parcelable interface. So in your case the declaration will be like:
You can read here how to implement Parcelable interface.