What I need is to capture the Qr and show the records of that code. I have something like that. This is my XAML.
<EditText
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:inputType="textPersonName"
android:ems="10"
android:layout_below="@+id/textView34"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:id="@+id/etcodigoUpdateProducto"
android:onClick="BuscarProducto"
android:hint=" Ingreso de código por medio del lector: " />
This is my code in Java.
public void BuscarProducto(View view)
{
AdminSQLiteOpenHelper admin = new AdminSQLiteOpenHelper(this,"Adminbase",null,1);
SQLiteDatabase db= admin.getWritableDatabase();
String Code=et1.getText().toString();
fila=db.rawQuery("select Familia,PartNumber,CapacidadCaja,CapacidadPallet,Ubicacion from Producto where Code='"+Code+ "'",null);
if (fila.moveToFirst())
{
et2.setText(fila.getString(0));
et3.setText(fila.getString(1));
et4.setText(fila.getString(2));
et5.setText(fila.getString(3));
et6.setText(fila.getString(4));
}
else
{
Toast.makeText(getApplicationContext(),"No existe un producto con dicho código",Toast.LENGTH_SHORT).show();
db.close();
}
}