X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=android%2Fsrc%2Fcom%2Fgoogle%2Fzxing%2Fclient%2Fandroid%2FIntents.java;h=6605baf796fbbbca62ed18f8ce0fa1bc60f54c10;hb=af4336d1bb8d6d8a4d34c3ecb48c26d2bb232473;hp=10e088ac15d9c29fce15a5fd05c0d4b79d4f4a0f;hpb=874dbf2b0db53eb21563619ebdf2c9b84f79a0e6;p=zxing.git diff --git a/android/src/com/google/zxing/client/android/Intents.java b/android/src/com/google/zxing/client/android/Intents.java index 10e088ac..6605baf7 100755 --- a/android/src/com/google/zxing/client/android/Intents.java +++ b/android/src/com/google/zxing/client/android/Intents.java @@ -36,10 +36,28 @@ public final class Intents { /** * By default, sending Scan.ACTION will decode all barcodes that we understand. However it * may be useful to limit scanning to certain formats. Use Intent.putExtra(MODE, value) with - * one of the values below (optional). + * one of the values below ({@link #PRODUCT_MODE}, {@link #ONE_D_MODE}, {@link #QR_CODE_MODE}). + * Optional. + * + * Setting this is effectively shorthnad for setting explicit formats with {@link #SCAN_FORMATS}. + * It is overridden by that setting. */ public static final String MODE = "SCAN_MODE"; + /** + * Comma-separated list of formats to scan for. The values must match the names of + * {@link com.google.zxing.BarcodeFormat}s, such as {@link com.google.zxing.BarcodeFormat#EAN_13}. + * Example: "EAN_13,EAN_8,QR_CODE" + * + * This overrides {@link #MODE}. + */ + public static final String SCAN_FORMATS = "SCAN_FORMATS"; + + /** + * @see com.google.zxing.DecodeHintType#CHARACTER_SET + */ + public static final String CHARACTER_SET = "CHARACTER_SET"; + /** * Decode only UPC and EAN barcodes. This is the right choice for shopping apps which get * prices, reviews, etc. for products. @@ -56,6 +74,11 @@ public final class Intents { */ public static final String QR_CODE_MODE = "QR_CODE_MODE"; + /** + * Decode only Data Matrix codes. + */ + public static final String DATA_MATRIX_MODE = "DATA_MATRIX_MODE"; + /** * If a barcode is found, Barcodes returns RESULT_OK to onActivityResult() of the app which * requested the scan via startSubActivity(). The barcodes contents can be retrieved with @@ -104,7 +127,7 @@ public final class Intents { * it defaults to QR Code. Use Intent.putExtra(FORMAT, format), where * format is one of Contents.Format. */ - public static final String FORMAT = "com.google.zxing.client.android.ENCODE_FORMAT"; + public static final String FORMAT = "ENCODE_FORMAT"; private Encode() { } @@ -130,6 +153,32 @@ public final class Intents { } } + public static final class WifiConnect { + /** + * Internal intent used to trigger connection to a wi-fi network. + */ + public static final String ACTION = "com.google.zxing.client.android.WIFI_CONNECT"; + + /** + * The network to connect to, all the configuration provided here. + */ + public static final String SSID = "SSID"; + + /** + * The network to connect to, all the configuration provided here. + */ + public static final String TYPE = "TYPE"; + + /** + * The network to connect to, all the configuration provided here. + */ + public static final String PASSWORD = "PASSWORD"; + + private WifiConnect() { + } + } + + public static final class Share { /** * Give the user a choice of items to encode as a barcode, then render it as a QR Code and