I have made Qr code Scanner using Intent using Zxing library and i have kept Library in application so that my app no longer require barcode scanner. But When barcode scanner is already in operating system, when i start my application , a dialog box appear asking complete action using : barcode scanner or My application . When I have all library in my own application Then how can i avoid this Dialog Box. Please help me out.
Example code :
Intent in = new intent("com.google.zxing.android.SCAN");
A dialog that can show a title, up to three buttons, a list of selectable items, or a custom layout. A dialog with a pre-defined UI that allows the user to select a date or time. Caution: Android includes another dialog class called ProgressDialog that shows a dialog with a progress bar.
Caution: Android includes another dialog class called ProgressDialog that shows a dialog with a progress bar. This widget is deprecated because it prevents users from interacting with the app while progress is being displayed.
When you want to show your dialog, create an instance of your DialogFragment and call show (), passing the FragmentManager and a tag name for the dialog fragment. You can get the FragmentManager by calling getSupportFragmentManager () from the FragmentActivity or getFragmentManager () from a Fragment. For example:
To build an AlertDialog: // 1. Instantiate an <code><a href="/reference/android/app/AlertDialog.Builder.html">AlertDialog.Builder</a></code> with its constructor // 2. Chain together various setter methods to set the dialog characteristics // 3.
To use:
Intent intent=new Intent("com.google.zxing.client.android.SCAN");
intent.setClassName("com.google.zxing.client.android", "com.google.zxing.client.android.CaptureActivity");
startActivityForResult(intent, 0);
Or:
Intent intent=new Intent("com.google.zxing.client.android.SCAN");
intent.setClassName(this, "com.google.zxing.client.android.CaptureActivity");
startActivityForResult(intent, 0);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With