Wish Proximity beacons wrapper Altbeacons

bluedude

Well-Known Member
Licensed User
Longtime User
Hi,

In the past I have paid someone to do support for ibeacons. This library is still usable but I want to support something called Altbeacons. It is a beacon specification that can both send iBeacon and Altebeacons specification on the same Bluetooth signal.

Altbeacons is invented by Radius Networks which is a big company in iBeacons.

Beacon technology can be very usefull for all kinds of apps.

Cheers,
 

Robert Mills

Member
Licensed User
Longtime User
Did you get the Altbeacons library converted into a B4A library. I need to be able to use some beacons for my project but the iBeacon libary has been taken down, so if you do get it up and running I would be happy to help pay for the work.
 

warwound

Expert
Licensed User
Longtime User
Did you get the Altbeacons library converted into a B4A library. I need to be able to use some beacons for my project but the iBeacon libary has been taken down, so if you do get it up and running I would be happy to help pay for the work.

I've created a wrapper for the easiBeacon library:
https://github.com/easibeacon/ibeacon-android-library

It supposedly works with all beacons and not just the easiBeacon beacons.
I've only used it with easiBeacon beacons so can't confirm it works with other beacons.

If you're interested i'll upload it.
 

Robert Mills

Member
Licensed User
Longtime User
I've created a wrapper for the easiBeacon library:
https://github.com/easibeacon/ibeacon-android-library

It supposedly works with all beacons and not just the easiBeacon beacons.
I've only used it with easiBeacon beacons so can't confirm it works with other beacons.

If you're interested i'll upload it.
Yes that would be great I've been trying to create a library and then tried to use the new V4.30 option to include inline java with the Altbeacon but haven't got it to work if you could upload the easiBeacon code it I would be most grateful. If there is any costs or time let me know.

Many Thanks
 

warwound

Expert
Licensed User
Longtime User
Yes that would be great I've been trying to create a library and then tried to use the new V4.30 option to include inline java with the Altbeacon but haven't got it to work if you could upload the easiBeacon code it I would be most grateful. If there is any costs or time let me know.

Many Thanks

I'll make some time over the weekend to upload the library along with an example project.
 

warwound

Expert
Licensed User
Longtime User
easiBeacons library available.

I'll upload the easiBeacons library to this thread and await any feedback.
If there's a need to start a new thread i'll do so after reading any feedback.

Please read post #5 in this thread for links to the easiBeacon website and github repo.

This library consists of 3 main objects: IBeacon, IBeaconListener and IBeaconProtocol.

You initialize an instance of the IBeaconProtocol object, add an IBeaconListener and start a scan.
Events are raised and an IBeacon object is passed to your event callback subs for any found beacons.

The library also contains a BluetoothHelper object which contains a single method named RequestEnable.
This helper library and method simply enables you to prompt the user to enable bluetooth if bluetooth is currently disabled in the device Settings.

I've tested this library extensively with easiBeacon beacons and it works perfectly.
The easiBeacon website says it will work with other brands of beacons but i have not tested that.

I've attached the library and also a simple b4a project that shows basic usage and syntax of the library.

Martin.
 

Attachments

  • easiBeacon-example-1.zip
    13.4 KB · Views: 499
  • easiBeacon_library_files_version_1.21.zip
    20.3 KB · Views: 385

warwound

Expert
Licensed User
Longtime User
I have just uploaded a new version of the easiBeacon library to post #9 in this thread.

Version 1.10 properly parses the beacon battery power level.
In the previous version battery level would always return -1.
It now returns what appears to be a percentage figure - but i am guessing here that the figure is a percentage.

Martin.
 

Robert Mills

Member
Licensed User
Longtime User
Tha
I have just uploaded a new version of the easiBeacon library to post #9 in this thread.

Version 1.10 properly parses the beacon battery power level.
In the previous version battery level would always return -1.
It now returns what appears to be a percentage figure - but i am guessing here that the figure is a percentage.

Martin.
nks for that I'm away at the moment for my job but I'll be back on Friday so hopefully get back to you
Thanks again
 

marcel

Active Member
Licensed User
Longtime User
Hi,

I am using a beacon from easibeacons but the distance is complete wrong. See attached picture. I don't know if this is because I am running Cyanogenmod on my
Samsung Galaxy S II instead of the real siemens software. This because the latest supported version on this device is 4.1.

I am using the easiBeacon ProMaxX.



 

Attachments

  • beacon.png
    beacon.png
    137.8 KB · Views: 458

warwound

Expert
Licensed User
Longtime User
Hi,

I am using a beacon from easibeacons but the distance is complete wrong. See attached picture. I don't know if this is because I am running Cyanogenmod on my
Samsung Galaxy S II instead of the real siemens software. This because the latest supported version on this device is 4.1.

I am using the easiBeacon ProMaxX.




Can you test on another device that has official support for BLE?
That is test it on an android 4.3+ device that is running it's official ROM.

See if the problem persists - it could be a problem with your easiBeacon, it could be a problem with CyanogenMod and it's implementation of Bluetooth 4.0 on the SII.
 

marcel

Active Member
Licensed User
Longtime User
Unfortunately not. But I will ask for some friends that might have such a device with the highest OS.
 

imgsimonebiliato

Well-Known Member
Licensed User
Longtime User
Hello,
thank you for this library.
I have a question. I founded more than 1 beacons so how can I exactly locate a specific beacon?
 

stu14t

Active Member
Licensed User
Longtime User
You can locate individual beacons either by ID (if different) or by altering the major and minor values, which then can differentiate individual beacons within the same ID
 

Jmu5667

Well-Known Member
Licensed User
Longtime User
Hi Martin

I seem to be getting the following error:

B4X:
** Service (svc_ibeacon) Create **
09/21/2015 11:07:20.505 - svc_ibeacon(), Service_Create
svc_ibeacon_service_create (java line: 429)
java.lang.NoClassDefFoundError: com.easibeacon.protocol.IBeaconProtocol$1
   at com.easibeacon.protocol.IBeaconProtocol.<init>(IBeaconProtocol.java:163)
   at com.easibeacon.protocol.IBeaconProtocol.getInstance(IBeaconProtocol.java:122)
   at uk.co.martinpearman.b4a.easibeacon.IBeaconProtocol.Initialize(IBeaconProtocol.java:88)
   at com.is.vitllinkSOS.svc_ibeacon._service_create(svc_ibeacon.java:429)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at anywheresoftware.b4a.BA.raiseEvent2(BA.java:187)
   at anywheresoftware.b4a.BA.raiseEvent(BA.java:171)
   at com.is.vitllinkSOS.svc_ibeacon.onCreate(svc_ibeacon.java:53)
   at android.app.ActivityThread.handleCreateService(ActivityThread.java:2884)
   at android.app.ActivityThread.access$1600(ActivityThread.java:162)
   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1459)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:158)
   at android.app.ActivityThread.main(ActivityThread.java:5751)
   at java.lang.reflect.Method.invokeNative(Native Method)
   at java.lang.reflect.Method.invoke(Method.java:511)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1083)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:850)
   at dalvik.system.NativeStart.main(Native Method)

Regards

John
 
Top