0
I am mounting an application to which you want to save the image in the SQLITE Database. 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. Thank you
My code where the error occurs:
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