android - Open Barcode Scanner several times -
this question has answer here:
- how trigger bulk mode scan in zxing 1 answer
i'm trying read qr_code unlimited times bar-code scanner. i'm doing this:
for(int = 1; <= 10; i++){ intent intent = new intent("com.google.zxing.client.android.scan"); intent.putextra("scan_mode", "qr_code_mode"); startactivityforresult(intent, 10); }
with code open bar-code 10 times, want open unlimited times until user press button on android! if put higher number in place of '10' app crashes because i'll open , open , open , open bar-code lot of times.
i'm not sure i'm explaining correctly, please let me know if need explain better.
i understand mean, not guaranteed work, , when "works" intend, terrible user experience. activities can respond same intent in 1 instance, , may written forget other intents "in progress". if spawn 10 activities, it's not nice make user pop through stack 10 deep.
you want invoke scanner, wait result, invoke scan, foamyguy pointing to.
Comments
Post a Comment