Blueup Beacons SDK
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
.idea Update Jun 30, 2017
.gitignore Update Jul 4, 2017
build.gradle Initial commit Jun 29, 2017

blueupbeacons-sdk for Android

Blueup SDK will make you able to develop Android applications that receive BlueUp beacons frames.

Getting Started

Reference in your Gradle file the library

compile 'com.blueupbeacons.sdk:sdk:1.0.0'



public int getRssi()

Get Current RSSI value

  • Returns: current rssi measured value

public int getBattery()

  • Returns: battery level (0-100)

public int getModel()

  • Returns: model

public String getModel(int padding)

  • Parameters: padding — padding length
  • Returns: model

public int getSerial()

  • Returns: serial number

public String getSerial(int padding)

  • Parameters: padding — padding length
  • Returns:

public String getName()

Get Beacon fullname (BLUEUP-xx-yyyyy)

  • Returns:

public String getAddress()

  • Returns: Device MAC Address

public AdvertisingFrames advertise()

  • Returns: Advertise flags

public JSONObject toJson()

  • Returns: Beacon json serialization

Scanner Handler Interface

Integer rssiThreshold()

Threshold limit. return null to accept all beacons return a valid value (e.g. -50 to -10) to filter beacons within a RSSI value

  • Returns: Threshold limit

void onError(Scanner scanner, int error)

Notify an error during scan

  • Parameters:
    • scanner — scanner instance
    • error — error code

void onStart(Scanner scanner)

Callback when the scanner has been started

  • Parameters: scanner — scanner instance

void onStop(Scanner scanner)

Callback when the scanner has been stopped

  • Parameters: scanner — scanner instance

boolean accept(Beacon beacon)

Filter to accept/refuse a Beacon found

  • Parameters: beacon — found beacon

  • Returns: true when the found beacon have to be notified

void onBeaconDetected(Scanner scanner, Beacon beacon)

  • Parameters:
    • scanner — scanner instance
    • beacon — Beacon found


public boolean isScanning()

  • Returns: whether the scanner is running

public void start(Mode mode)

Start the scanner with the specified scan mode. LowPower Perform Bluetooth LE scan in low power mode. This is the default scan mode as it consumes the least power. Balanced Perform Bluetooth LE scan in balanced power mode. Scan results are returned at a rate that provides a good trade-off between scan frequency and power consumption. MaxPerformanceScan using highest duty cycle. It's recommended to only use this mode when the application is running in the foreground.

  • See also: Mode

  • Parameters: mode — scan mode

public void start()

Start the scanner with the default scan mode Balanced

  • See also: Mode

public void stop()

Stop the scanner

public void toggle()

Start or stop the scanner.


Scanner scanner = new Scanner(new Scanner.Handler() {
                        private final String TAG = "Scanner.Handler";

                        public Integer rssiThreshold() {
                            return null;

                        public void onError(Scanner scanner, int error) {
                            Log.d(TAG, "onError: " + String.valueOf(error));

                        public void onStart(Scanner scanner) {
                            runOnUiThread(new Runnable() {
                                public void run() {
                                    btActivity.setText("Stop Scan");

                        public void onStop(Scanner scanner) {
                            runOnUiThread(new Runnable() {
                                public void run() {
                                    btActivity.setText("Start Scan");

                        public boolean accept(Beacon beacon) {
                            return true;

                        public void onBeaconDetected(Scanner scanner, final Beacon beacon) {
                            Log.d(TAG, beacon.toString());
                   Runnable() {
                                public void run() {



public String getNamespace()

  • Returns: Namespace ID

public String getInstance()

  • Returns: Instance ID


public String getUrl()

  • Returns: Url;


public int getVersion()

  • Returns: version

public boolean isEncrypted()

  • Returns: is content encrypted

public int getBatteryVoltage()

  • Returns: battery voltage

public double getTemperature()

  • Returns: temperature

public long getPackets()

  • Returns: number of packets advertised since boot

public long getTimeSincePowerOn()

  • Returns: milliseconds since last reboot

public Date getRebootDate()

  • Returns: Date of last reboot


public String getId()

  • Returns: Identifier


public String getUuid()

  • Returns: UUID

public int getMajor()

  • Returns: Major

public int getMinor()

  • Returns: Minor


public boolean hasCustomTag()

  • Returns: Advertise custom tag

public String getCustomTag()

  • Returns: Custom tag Value if set, otherwise NULL


public double getTemperature()

  • Returns: Temperature

public double getHumidity()

  • Returns: Humidity

public double getPressure()

  • Returns: Pressure