pochi giorni fa ho spiegato tutto in questo link
ma se vuoi ti posso e-mailare un esempio