Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change text when scanning barcodes with Zxing via intent in Android?

Is it possible to change the prompt text that says "place the barcode inside the viewfinder..." when launching the Barcode scanner (zxing) via intent ?

Intent intent = new Intent("com.google.zxing.client.android.SCAN")

I want to have a prompt in my language, how should I do that?

like image 731
DixieFlatline Avatar asked Nov 29 '22 05:11

DixieFlatline


2 Answers

Yes, plain and simple:

intent.putExtra("PROMPT_MESSAGE", "Your Text Here");
like image 87
Helvio Avatar answered Dec 09 '22 20:12

Helvio


If it's worth to anyone, here's how you do it with IntentIntegrator if you decided to import ZXings libraries to Android Studio:

integrator.addExtra("PROMPT_MESSAGE", "Your message here");
like image 36
Razgriz Avatar answered Dec 09 '22 20:12

Razgriz