I am trying to pass the HashMap between between my services and activity. I know how to pass Arraylist with custom objects. But failed to find the solutions for passing hashmap from service.
I have service from where I want to send hashMap to my activity
public void getpProperies(ArrayList<property> values){
if(values != null && values.size() > 0){
for(property si : values){
if(si instanceof esOtherProperty){
Log.d(TAG, "Data "+ ((esOtherProperty) si).name);
}
if(si instanceof esEmpProperty){
Log.d(TAG, "EMP Data "+ ((esEmpProperty) sig).name);
}
}
}
Bundle bundle = new Bundle();
bundle.putParcelableArrayList("si", allvalues);
if(resultReceiver != null)
resultReceiver.send(100,bundle);
}
private HashMap<String, ArrayList<esProperty>> allvalues;
so instead bundle.putParcelableArrayList("si", allvalues), is there any way to pass allvalues hashmap. I looked in Bundle Class but did not find anything.