I'm putting together an application that you want to save the image to in SQLITE Bank. I am not able to proceed because the following error occurs ImageView cannot be converted to Byte[]
I ask to be the most specific given my inexperience. Thanks
My code where the error occurred:
Button btn1Salvar = (Button) findViewById(R.id.btSalvar);
btn1Salvar.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Produto pro = new Produto();
pro.setId(Integer.valueOf(edId.getText().toString()));
pro.setDescricao(edDescricao.getText().toString());
pro.setPrecoDeCusto(MonetaryMask.stringMonetarioToDouble(edPrecoDeCusto.getText().toString()));
pro.setPercDeLucro(Double.valueOf(edPercDeLucro.getText().toString()));
pro.setPrecoDeVenda(MonetaryMask.stringMonetarioToDouble(edPrecoDeVenda.getText().toString()));
pro.setImagem(imgView); // <-- aqui aparece o erro..sublinhado no imgView