AltBeacon onBeaconServiceConnect not called

I launched the implementation of a simple Beacon monitor with the AltBeacon library using its examples. In short: I took his help application , downloaded and integrated his latest build and run the application on my Samsung Galaxy S2 with CM (Android 4.4.4). I see that the callback onBeaconServiceConnect has never been called, although bindService is called. I believe that onBeaconServiceConnect should be called for the application to work properly.

I tried to set beaconManager.debug = true; but he didnโ€™t show me any new magazines (perhaps because I use precompiled libraries from the site).

I also checked if there is a problem with my firmware / equipment, but I see that it is able to track beacons with other applications from Google Play. I have an iPhone and MacBook and another Android device, so I can simulate any transmit signal that is needed for AltBeacon to catch it.

Can someone help me? I would appreciate any clue you give me!

+5
source share
1 answer

The inability to receive the onBeaconServiceConnect usually caused by the incorrect installation of AndroidManifest.xml for the BeaconService . The library uses manifest merging to automatically merge these definitions into your AndroidManifest.xml application from the AndroidManifest.xml library at compile time. If manifest merge is not enabled, the service will never be advertised and the application will not receive the onBeaconServiceConnect .

If you use Eclipse, check the project.properties file and make sure it has the line: manifestmerger.enabled=true .

If this does not solve your problem, send the code attached to the BeaconService and inform us about the IDE that you are using.

+7
source

Source: https://habr.com/ru/post/1201463/


All Articles