Correctionn accès à la base de donnéees pour la requête après scan

This commit is contained in:
Jacques Foucry 2016-06-10 21:16:56 +02:00
parent 6ea18c2254
commit 255c8714b6

View file

@ -171,7 +171,10 @@ public class MedicamentListActivity extends AppCompatActivity {
{
cip13 = contents.substring(4,17);
}
dbMedoc.openDatabase();
Medicament scannedMedoc = dbMedoc.getMedocByCIP13(cip13);
dbMedoc.close();
if (scannedMedoc != null) {
Toast.makeText(context, "Medicament found in database", Toast.LENGTH_LONG).show();