未调用AltBeacon onBeaconServiceConnect [英] AltBeacon onBeaconServiceConnect not called

查看:166
本文介绍了未调用AltBeacon onBeaconServiceConnect的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我坚持使用AltBeacon库的示例来实现简单的Beacon监视器。简而言之:
我使用了它的引用应用 并将其最新的构建和运行应用程序集成到带有CM(Android 4.4的Samsung Galaxy S2)上.4)。我看到尽管调用了bindService,但从未调用过onBeaconServiceConnect回调。我相信应调用onBeaconServiceConnect才能使应用程序正常工作。

I stuck implementing simple Beacon monitor with AltBeacon library using its examples. In short: I took its reference application, downloaded and integrated its latest build and run app on my Samsung Galaxy S2 with CM (Android 4.4.4). I see that onBeaconServiceConnect callback never called, though bindService is called. I believe onBeaconServiceConnect should be called in order application to work correctly.

我尝试设置beaconManager.debug = true;但这并没有显示任何新日志(可能是因为我正在使用站点上的预编译库)。

I've tried to set beaconManager.debug = true; but it didn't show me any new logs (maybe because I'm using precompiled libraries from site).

我还检查了固件/硬件-但我发现它可以通过Google Play监视其他应用程序的信标。我有iPhone和MacBook,还有另一个Android设备,因此我可以模拟让AltBeacon捕获它所需的任何传输信号。

Also I've checked if the problem with my firmware/hardware - but I see it's able to monitor beacons with other applications from Google Play. I have iPhone and MacBook and one more android device so I can simulate any transmitting signal which is needed to let AltBeacon catch it.

有人可以帮我吗?

推荐答案

无法收到对 onBeaconServiceConnect的回调,我将不胜感激! code>通常是由于错误的 AndroidManifest.xml 设置导致声明 BeaconService 引起的。该库使用清单合并自动将这些定义从库的 AndroidManifest.xml 合并到应用程序的 AndroidManifest.xml 中时间。如果未启用清单合并,则将永远不会声明该服务,并且该应用程序将不会获得 onBeaconServiceConnect 回调。

A failure to receive a callback to onBeaconServiceConnect is usually caused by an incorrect AndroidManifest.xml setup to declare the BeaconService. The library uses manifest merging to automatically merge these definitions into your app's AndroidManifest.xml from the library's AndroidManifest.xml at compile time. If manifest merging is not enabled, the service will never be declared and the app will not get the onBeaconServiceConnect callback.

如果使用Eclipse,请检查您的project.properties文件,并确保其所在行: manifestmerger.enabled = true

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

如果这不能解决您的问题,请发布绑定到 BeaconService 的代码,并告知我们您正在使用的IDE。

If this does not solve your problem, please post the code that binds to the BeaconService and let us know the IDE you are using.

这篇关于未调用AltBeacon onBeaconServiceConnect的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆