Skip to content

NullPointerException in LollipopScanStrategy #76

@kshitij-sminq

Description

@kshitij-sminq

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)

Activity

pwittchen

pwittchen commented on May 9, 2017

@pwittchen
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @pwittchen@kshitij-sminq

        Issue actions

          NullPointerException in LollipopScanStrategy · Issue #76 · pwittchen/ReactiveBeacons