Estimote / Xamarin-Bindings

Examples of how to bind Estimote SDKs to Xamarin
Apache License 2.0
17 stars 12 forks source link

EstimoteBluetoothScanning is missing #4

Closed MatthewGerber closed 6 years ago

MatthewGerber commented 6 years ago

Hello -

I am trying to build the current bindings project. It does build, but running the iOS example app in the simulator crashes immediately with the following output:

dyld: Library not loaded: @rpath/EstimoteBluetoothScanning.framework/EstimoteBluetoothScanning
  Referenced from: /Users/matthewgerber/Library/Developer/CoreSimulator/Devices/514214D4-5061-4FE5-B70B-660552A1CCC6/data/Containers/Bundle/Application/246F5FA0-31B0-41C7-9AB6-3E629177BB65/Example.iOS.Proximity.app/Frameworks/EstimoteProximitySDK.framework/EstimoteProximitySDK
  Reason: image not found

Can you fix this on your end, or is it a problem on mine?

Thanks!

MatthewGerber commented 6 years ago

I tried manually adding the EstimoteBluetoothScanning framework to the bindings project, but then ran into the following issue:

https://github.com/Estimote/iOS-Proximity-SDK/issues/7

@heypiotr Can you please update these bindings to 0.12.0 to see if it fixes this issue?

Thanks!

MatthewGerber commented 6 years ago

@heypiotr Do you know when you might be able to get to this?

heypiotr commented 6 years ago

Done! Let me know if this worked for you.

MatthewGerber commented 6 years ago

@heypiotr Thanks for the updated bindings. They work perfectly on iOS. However, there seems to be a problem on Android. Your example Android app works fine when running the scanner in a foreground service. However, the foreground service does not work in any of my projects. I created a fresh Xamarin Android project and copy/pasted your example Android activity code into the project. I then referenced the Estimote bindings .dll, added the service declaration to the manifest, etc. Despite everything I have tried with this new Android project, I cannot get the Estimote bindings to run a BLE scan using a foreground service. The activity requests the location permission and calls observationHandler = observer.Start(); without any errors...then it just sits there without writing the usual messages to the console about BLE scanning, and proximity events are never reported.

I believe reproducing this should be simple: Just create a new Xamarin Android project, add your example activity code to it, and reference the Android bindings .dll. Can you get it to run the scanner in a foreground service?

I'm on a Mac, if it matters.

Please let me know what you think about this.

MatthewGerber commented 6 years ago

@heypiotr Another detail: If I do not run the scanner in a foreground service (i.e., by commenting out .WithScannerInForegroundService(notification)) then everything works fine in my testing app -- I get the expected BLE scanner outputs in the console, and proximity events are detected.

So the issue is related to running the scan in a foreground service. This works in your example app, but does not work in any other app I have tried (my production app, my fresh Android app, etc.).

Any help would be greatly appreciated. Trying to push a release out...

MatthewGerber commented 6 years ago

@heypiotr just checking in on this. Have you tried reproducing the issue described above related to the foreground service?

dcantu96 commented 4 years ago

This is still happening to me, is there a fix? I downloaded the proximity beacon xcode project and tried to run it, its not working with xcode 11 and swift 5.0 or swift 4.2