0

i want to ask if there is a way to use BeaconSimulator to simulate iBeacon on release version of my application. I am displaying content based on iBeacon that user sees and i want to show information about my application and for example that user needs to turn on Bluetooth etc.

I want to have some kind of iBeacon always visible (also when BT is turned of) to instruct user. Is there some way to achieve this ?

Thanks

Regards

Juraj

Juraj
  • 33
  • 5

1 Answers1

0

The Android Beacon Library's BeaconSimulator is automatically disabled for release builds of applications. This is intended as a safety check, to keep from accidentally releasing code with the simulator active if you forget to disable it in code.

This safety check is based on the ApplicationInfo.FLAG_DEBUGGABLE, which automatically gets set to false by Gradle when doing a release build. If you really want to allow the simulator to run in a release build, you can try setting the debuggable flag to true for release builds in your build.gradle file like this:

android {
    ...
    buildTypes {
        release {
            debuggable true
        }
}
davidgyoung
  • 63,876
  • 14
  • 121
  • 204
  • Thanks i will try this. Is there some concerns with this settings for security of my app? I partially solved it with calling didRangeBeaconsInRegion with field containing my "initialBeacon" but it has only a partial effect. – Juraj Jun 10 '15 at 14:09
  • Yes, this does have implications for security of your app, but it is the only option unless you want to build a special version of the AndroidBeaconLibrary from source that removes this check. If you want to make a feature request to be able to disable this safety check through configuration, you can do so here: https://github.com/AltBeacon/android-beacon-library/issues – davidgyoung Jun 10 '15 at 21:51