Noticed we should just use BarcodeFormat constants in the client for simplicity
[zxing.git] / android / src / com / google / zxing / client / android / Contents.java
index ccd0a80..3080ecd 100755 (executable)
 
 package com.google.zxing.client.android;
 
+import android.provider.Contacts;
 
+/**
+ * The set of constants to use when sending Barcode Scanner an Intent which requests a barcode
+ * to be encoded.
+ *
+ * @author dswitkin@google.com (Daniel Switkin)
+ */
 public final class Contents {
-
-  /**
-   * All the formats we know about.
-   */
-  public static final class Format {
-    public static final String UPC_A = "UPC_A";
-    public static final String UPC_E = "UPC_E";
-    public static final String EAN_8 = "EAN_8";
-    public static final String EAN_13 = "EAN_13";
-    public static final String CODE_39 = "CODE_39";
-    public static final String CODE_128 = "CODE_128";
-    public static final String QR_CODE = "QR_CODE";
+  private Contents() {
   }
 
   public static final class Type {
@@ -78,6 +74,24 @@ public final class Contents {
      * intent.putExtra(Intents.Encode.DATA, bundle);
      */
     public static final String LOCATION = "LOCATION_TYPE";
+
+    private Type() {
+    }
   }
 
+  /**
+   * When using Type.CONTACT, these arrays provide the keys for adding or retrieving multiple
+   * phone numbers and addresses.
+   */
+  public static final String[] PHONE_KEYS = {
+      Contacts.Intents.Insert.PHONE,
+      Contacts.Intents.Insert.SECONDARY_PHONE,
+      Contacts.Intents.Insert.TERTIARY_PHONE
+  };
+
+  public static final String[] EMAIL_KEYS = {
+      Contacts.Intents.Insert.EMAIL,
+      Contacts.Intents.Insert.SECONDARY_EMAIL,
+      Contacts.Intents.Insert.TERTIARY_EMAIL
+  };
 }