public static ActionGroup parse(Context context, String actionGroupId, JSONArray actionsJSONArray) {
        List<Action> actions = new ArrayList<Action>(actionsJSONArray.length());

        for (int i = 0; i < actionsJSONArray.length(); i++) {
            JSONObject actionOptions = actionsJSONArray.optJSONObject(i);
            String actionType = actionOptions.optString("type", "button");

            if (!(actionType.equals("button") || actionType.equals("input"))) {
                Log.w("Action", "Unknown type: " + actionType);
                continue;
            }

            actions.add(new Action(context, actionOptions));
        }

        return new ActionGroup(actionGroupId, actions.toArray(new Action[actions.size()]));
    }
Creates an action group by parsing the specified action specs.
@param actionGroupId
@param actionsJSONArray The list of actions.
@return A new action group.
src/android/action/ActionGroup.java