Tuesday, October 13, 2015

Useful macro in Bluetooth

Device Type:
    * Bluetooth device type, Unknown
     */
    public static final int DEVICE_TYPE_UNKNOWN = 0;
    /**
     * Bluetooth device type, Classic - BR/EDR devices
    */
    public static final int DEVICE_TYPE_CLASSIC = 1;
    /**
     * Bluetooth device type, Low Energy - LE-only
    */
    public static final int DEVICE_TYPE_LE = 2;
    /**
     * Bluetooth device type, Dual Mode - BR/EDR/LE
    */
    public static final int DEVICE_TYPE_DUAL = 3;
/**
     * A bond attempt succeeded
     * @hide
     */
    public static final int BOND_SUCCESS = 0;
   /**
     * A bond attempt failed because pins did not match, or remote device did
     * not respond to pin request in time
     * @hide
     */
    public static final int UNBOND_REASON_AUTH_FAILED = 1;

    /**
     * A bond attempt failed because the other side explicitly rejected
     * bonding
     * @hide
     */
    public static final int UNBOND_REASON_AUTH_REJECTED = 2;

   /**
     * A bond attempt failed because we canceled the bonding process
     * @hide
     */
    public static final int UNBOND_REASON_AUTH_CANCELED = 3;

    /**
     * A bond attempt failed because we could not contact the remote device
     * @hide
     */
    public static final int UNBOND_REASON_REMOTE_DEVICE_DOWN = 4;

    /**
     * A bond attempt failed because a discovery is in progress
     * @hide
     */
    public static final int UNBOND_REASON_DISCOVERY_IN_PROGRESS = 5;

    /**
     * A bond attempt failed because of authentication timeout
     * @hide
    */
    public static final int UNBOND_REASON_AUTH_TIMEOUT = 6;

    /**
     * A bond attempt failed because of repeated attempts
     * @hide
     */
    public static final int UNBOND_REASON_REPEATED_ATTEMPTS = 7;

    /**
     * A bond attempt failed because we received an Authentication Cancel
     * by remote end
     * @hide
     */
    public static final int UNBOND_REASON_REMOTE_AUTH_CANCELED = 8;

/**
479     * The user will be prompted to enter a pin or
480     * an app will enter a pin for user.
481     */
482    public static final int PAIRING_VARIANT_PIN = 0;

    public static final int PAIRING_VARIANT_PASSKEY = 1;
489
490    /**
491     * The user will be prompted to confirm the passkey displayed on the screen or
492     * an app will confirm the passkey for the user.
493     */
494    public static final int PAIRING_VARIANT_PASSKEY_CONFIRMATION = 2;
495
496    /**
497     * The user will be prompted to accept or deny the incoming pairing request
498     * @hide
499     */
500    public static final int PAIRING_VARIANT_CONSENT = 3;
501
502    /**
503     * The user will be prompted to enter the passkey displayed on remote device
504     * This is used for Bluetooth 2.1 pairing.
505     * @hide
506     */
507    public static final int PAIRING_VARIANT_DISPLAY_PASSKEY = 4;
508
509    /**
510     * The user will be prompted to enter the PIN displayed on remote device.
511     * This is used for Bluetooth 2.0 pairing.
512     * @hide
513     */
514    public static final int PAIRING_VARIANT_DISPLAY_PIN = 5;

No comments:

Post a Comment

Qualcomm Short Term

  113 is the SL. 1st Target by mid July.

Total Pageviews