I think my answer (here) to another question can help you. If you need more information or something is not clear don't hesitate and ask.
Here is only a part of mentioned answer:
// set action
buttonOneIntent.setAction(BUTTON_ONE_CLICKED);
buttonTwoIntent.setAction(BUTTON_TWO_CLICKED);
buttonThreeIntent.setAction(BUTTON_THREE_CLICKED);
buttonFourIntent.setAction(BUTTON_FOUR_CLICKED);
// ......