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

NullPointerException in LollipopScanStrategy #76

Open
kshitij-sminq opened this issue May 9, 2017 · 1 comment
Open

NullPointerException in LollipopScanStrategy #76

kshitij-sminq opened this issue May 9, 2017 · 1 comment

Comments

@kshitij-sminq
Copy link

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.bluetooth.le.BluetoothLeScanner.startScan(android.bluetooth.le.ScanCallback)' on a null object reference at com.github.pwittchen.reactivebeacons.library.scan.strategy.lollipop.LollipopScanStrategy.observe(LollipopScanStrategy.java:36) at com.github.pwittchen.reactivebeacons.library.ReactiveBeacons.observe(ReactiveBeacons.java:143) at com.github.pwittchen.reactivebeacons.library.ReactiveBeacons.observe(ReactiveBeacons.java:120) at com.sminq.user.services.BleBeaconService$1.run(BleBeaconService.java:180) at android.os.Handler.handleCallback(Handler.java:815) at android.os.Handler.dispatchMessage(Handler.java:104) at android.os.Looper.loop(Looper.java:207) at android.app.ActivityThread.main(ActivityThread.java:5769) at java.lang.reflect.Method.invoke(Method.java) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)

@pwittchen
Copy link
Owner

Hi,

Thanks for reporting this issue.
It looks like Bluetooth is turned off. Please, take a look at the Good Practices section in README.md file. You should fulfill requirements mentioned in this section:

  • update Manifest
  • check BLE support
  • request Bluetooth access
  • request Location access for API 23 and higher
  • request runtime permissions for API 23 and higher

Take a look at the exemplary code snippet and examplary app.

Regards,
Piotr

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