public class NewProductPresenter implements NewProductContract.Presenter, NewProductContract.Model.OnAddProductListener, NewProductContract.Model.OnModifyProductListener { private NewProductModel model; private NewProductView view; public NewProductPresenter(NewProductView view) { this.view = view; model = new NewProductModel(view.getApplicationContext()); } @Override public void addProduct(String name, String category, String quantity, String price, boolean important, byte[] productImage) { if (!validData(name, category, quantity, price, important, productImage)) view.showMessage("Error al validar la informaciĆ³n"); Product product = new Product(name, category, Integer.parseInt(quantity), Float.parseFloat(price), important, productImage); model.addProduct(product, this); } @Override public void onAddProductSuccess(Product product) { view.showMessage("ok"); } @Override public void onAddProductError(String message) { view.showMessage("error"); } . . . . . .