evothings / phonegap-estimotebeacons

This repository is no longer maintained - new maintainer is welcome!
MIT License
338 stars 178 forks source link

Android +Example Project Error #38

Open Almaas opened 10 years ago

Almaas commented 10 years ago

Hi, I have been trying to use this plugin with Estimote beacons,android device and cordova/phonegap. There are not errors in the download process and I have followed all the troubleshooting steps.

However when I run the example project provided. Nothing is displayed other than "Connecting to Device","Device Ready","Searching for Beacons". The demo app provided in the PlayStore works fine and I am able to see the detected beacons.

I have not changed the code in the examples project.

Is this plugin compatible with android? Had anyone used it with an android device?

If no are the other plugins which would work with an android device??

I would really appreciate any advice, help

arumsey commented 10 years ago

This plugin is only compatible with iOS. Check out https://github.com/jmusyj/phonegap-estimote-plugin for an Android version.

ghost commented 9 years ago

Hello, there is an updated version of the plugin in the master branch that has Android support. Keep in mind that the JavaScript API is updated and not backwards compatible, so you need to update the code in your app. Sorry for this inconvenience.

ghost commented 9 years ago

@Almaas Have you had some time to test the new Android version of the plugin?

bickle66 commented 9 years ago

It doesn't work for me. I get a Null pointer exception when accessing the bluetooth device. (yes BT is enabled)

I/EstimoteBeacons( 2386): initialize
I/EstimoteBeacons( 2386): startRangingBeaconsInRegion
I/EstimoteBeacons( 2386): connect
I/EstimoteSDK( 2386): com.estimote.sdk.service.BeaconService.onCreate:186 Creating service
E/BluetoothAdapter( 2386): Bluetooth binder is null
I/EstimoteBeacons( 2386): onServiceReady
I/EstimoteBeacons( 2386): startRanging
E/AndroidRuntime( 2386): FATAL EXCEPTION: BeaconServiceThread
E/AndroidRuntime( 2386): Process: com.evothings.beaconfinder, PID: 2386
E/AndroidRuntime( 2386): java.lang.NullPointerException: Bluetooth adapter cannot be null
E/AndroidRuntime( 2386):    at com.estimote.sdk.internal.Preconditions.checkNotNull(Preconditions.java:21)
E/AndroidRuntime( 2386):    at com.estimote.sdk.service.BeaconService.startRanging(BeaconService.java:232)
E/AndroidRuntime( 2386):    at com.estimote.sdk.service.BeaconService.access$1200(BeaconService.java:62)
E/AndroidRuntime( 2386):    at com.estimote.sdk.service.BeaconService$IncomingHandler$1.run(BeaconService.java:473)
E/AndroidRuntime( 2386):    at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime( 2386):    at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime( 2386):    at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 2386):    at android.os.HandlerThread.run(HandlerThread.java:61)
W/ActivityManager( 1219):   Force finishing activity com.evothings.beaconfinder/.CordovaApp
ghost commented 9 years ago

@bickle66 Thanks for reporting, will try to take a look at this the coming week.

ghost commented 9 years ago

@bickle66 What is the status of this bug? Have not been able to reproduce. Do you have a code snippet that reproduces the problem?