Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.NullPointerException when using SDK on Emulator #134

Closed
homtec opened this issue Dec 20, 2015 · 2 comments
Closed

java.lang.NullPointerException when using SDK on Emulator #134

homtec opened this issue Dec 20, 2015 · 2 comments

Comments

@homtec
Copy link

homtec commented Dec 20, 2015

When using the SDK on the standard Android emulator, you get a NullPointerException as BluetoothAdapter is not present.

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.bluetooth.BluetoothAdapter.isEnabled()' on a null object reference

Poberro added a commit that referenced this issue Dec 22, 2015
…hen scanning really started and when it stopped. User may switch the Bluetooth off and then turn it on when

  application is running. This listener allows to track this events and react properly to them (eg. gray out device list). See ListBeaconsActivity to see sample code.
  ```java
    beaconManager.setScanStatusListener(new BeaconManager.ScanStatusListener() {
      @OverRide public void onScanStart() {
        // Unlock UI
	list.setEnabled(true);
        list.setAlpha(1.0f);
      }

      @OverRide public void onScanStop() {
        // Lock UI
	list.setEnabled(false);
        list.setAlpha(0.5f);
      }
    });
  ```
- Fixed (#134): java.lang.NullPointerException when using SDK on Emulator
@Poberro
Copy link
Contributor

Poberro commented Dec 22, 2015

This issue is fixed in SDK release 0.9.6

@Poberro Poberro closed this as completed Dec 22, 2015
@homtec
Copy link
Author

homtec commented Dec 22, 2015

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants