Our app does not use Bluetooth and we don't want to add that permission to use the Salesforce Exact Target Push SDK. How can we safely (no crashes on ICS, JB, and KitKat) exclude the requirement of Bluetooth.

Doing either of the following seems to exclude the offending library or permissions, but I need to know if this is the correct way to exclude the permission without Salesforce introducing crashes given Bluetooth Permission removal on JB4A on Android < 5.0 mentions that on the older SDK ICS, JB, and Kitkat (4.4.4 or less) will crash.

compile ('com.exacttarget.etpushsdk:etsdk:4.5.0@aar') {
         exclude module: 'org.altbeacon:android-beacon-library


configurations {
    compile.exclude group: 'org.altbeacon'

compile ('com.exacttarget.etpushsdk:etsdk:4.5.0@aar') {
        transitive = true


<!-- Exclude bluetooth -->
<uses-permission android:name="android.permission.BLUETOOTH" tools:node="remove" />
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN" tools:node="remove" />

Possible long term fixes:

  • if excluding the beacon lib or permissions is fully supported - documenting it
  • publish a second variant of the push library that does not include bluetooth - i.e. "etsdk-nobluetooth" (similar to how leakcanary has a no-op variant)
  • exclude the bluetooth permissions in your codebase and only use bluetooth if the implementing app gives bluetooth permission (this is what placer.io does https://placer.readme.io/docs/android)

1 Answer 1


The version of the SDK you were previously using had a bug with regards to the Bluetooth dependency and as a result the library had to be included no matter what. That has been resolved and you can safely remove it from your dependencies and permissions.

I use transitive=true along with an exclusion statement for beacons in a sample application.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .