enter code here
You are not supposed to do anything in getChildId
you should only return the id. You should do everything in ExpandableListActivity.onChildClick
and such.
That is, getChildId should not change the state of your program. Because it can be called arbitrarily by the Android framework.
Just return something like groupPosition*100 + childPosition
. Then in ExpandableListActivity.onChildClick
and such you can figure out the id by the same formula.