Phonegap-plugin-barcodescanner: Disable clipboard in Android

Created on 10 May 2016  路  7Comments  路  Source: phonegap/phonegap-plugin-barcodescanner

Im looking for a way to prevent android coping the scan result to clipboard. From what I have found it can be done via Zxing preferences, but the problem is with intents I dont have much access to it. Any ideas how to deal with this?

duplicate question android

All 7 comments

@McOffsky, have you tried to use preferences_copy_to_clipboard parameter?

Hi @daserge how can I use this parameter? I dont know where to put, and didn't found any example. Thanks in advance!! Regards

@jorgeram I suppose you need to follow the steps at https://github.com/EddyVerbruggen/barcodescanner-lib-aar#steps-to-build-a-new-aar.
There is preferences.xml containing preferences_copy_to_clipboard.
It would be great if you could write your findings here.

Hi @daserge my problem was because my development is an Ionic Framework project (cordova / phonegap) and I am not familiar with Android Studio to modify and compile a new aar. Luckily after some try i got working by this way:

  1. Download and unzip barcodescanner-lib-aar from EddyVerbruggen
  2. Open Android Studio and this AAR project
  3. Change line 55 of src/main/res/xml/preferences.xml (true to false)
  4. Build Menu -> Rebuild project
  5. Get build/outputs/aar/barcodescanner-debug.apk and use it to replace the original library in your Android project (my_ionic_project/platforms/android/libs/barcodescanner.aar)
  6. Rebuild the Android project with the new AAR from Android Studio.

Thank you very much!
Regards.

197

Hi, i have the same issue, when i scan the QRCode, its content is copied to the clipboard.
Did you found a solution for this issue ?

This thread has been automatically locked.

Was this page helpful?
0 / 5 - 0 ratings