Tip: Remove Secret Codes Broadcastreceiver from your manifest

If you donĀ“t want to ship the secret codes feature of the SDK, add this to your application part of your manifest.

XML
<receiver
   android:name="com.sensorberg.sdk.SensorbergCodeReceiver"
   tools:node="remove"
   tools:selector="com.sensorberg.sdk" />

If you leave the receiver active you can also trigger it using adb:

Bash
#enable logging
adb shell am broadcast -W -a android.provider.Telephony.SECRET_CODE -d android_secret_code://73676723741
#disable logging
adb shell am broadcast -W -a android.provider.Telephony.SECRET_CODE -d android_secret_code://73676723740

Check your manifest with apktool

To make sure this worked, test your final APK with apktool

Bash
apktool d -s -f <your-apk-file>

This tip works with all versions of the Android SDK.