FAQ & troubleshooting for Android SDK

FAQ and troubleshooting guide for integration, messaging, event tracking, and debugging.

This page answers common questions about integrating and using the Blueshift Android SDK.

Setup and initialization

Where do I add the SDK initialization code?

Add SDK initialization in your Application class's onCreate() method. See SDK setup for complete instructions.

What permissions does the SDK require?

Required permissions:

  • INTERNET - For API communication
  • ACCESS_NETWORK_STATE - To check network availability
  • POST_NOTIFICATIONS - For push notifications (Android 13+)

How do I get my API key?

Sign in to the Blueshift dashboard and navigate to Account Settings → API Keys.


Push notifications

Push notifications aren't being received. What should I check?

  1. Verify google-services.json is in your app/ directory
  2. Check if the FCM token is generated (look for "FCM Token" in Logcat)
  3. Confirm notification permissions are granted (Android 13+)
  4. Test with a direct FCM token send from Push Studio

See Push notifications → Test for details.

Do I need to request notification permissions?

Yes, for Android 13 (API level 33) and above. The SDK provides requestPushNotificationPermission() to handle this. See Push notifications → Request permissions.

Will notifications work if the app is closed?

Yes, if FCM is appropriately configured. Push notifications are delivered by the system even when your app is not running.


In-app messages

In-app messages aren't showing. What should I check?

  1. Verify the activity is registered: registerForInAppMessages(activity)
  2. Check that the trigger event fired (look for the event in Logcat)
  3. Confirm the device ID matches the test send
  4. Check that the campaign is active and targeting your user

How do I show in-app messages on specific screens only?

Call registerForInAppMessages(activity) only in activities where you want messages to appear. Call unregisterForInAppMessages(activity) when leaving those screens.


Mobile inbox

How do I check the number of unread messages in the inbox?

Use BlueshiftInboxManager.getUnreadMessagesCount(). See Mobile inbox → Get unread count for code examples.

Inbox is empty even after sending test messages. Why?

  1. Verify isInboxEnabled = true in your Configuration
  2. Check that the device ID matches the test send
  3. Confirm the message was sent with "Deliver to inbox" enabled
  4. Wait a few minutes for sync to complete

Universal links

Universal links open in the browser instead of the app. Why?

This happens when Android hasn't verified domain ownership. Common causes:

  1. assetlinks.json file is not accessible at https://your-domain/.well-known/assetlinks.json
  2. Domain verification hasn't completed yet (try reinstalling the app)
  3. Intent filter missing android:autoVerify="true"

See Universal links → Troubleshooting.

How do I test universal links locally?

Use a custom scheme for local testing:

adb shell am start -a android.intent.action.VIEW -d "yourappname://test"

See Universal links → Test for complete testing steps.


Event tracking

How do I verify events are being sent?

  1. Check Logcat for event logs:
adb logcat | grep "Blueshift"
  1. Go to Blueshift dashboard → Users → Search by device ID.
  2. Check the user's activity timeline

See Testing SDK → Event tracking.

Where do I find my device ID?

The device ID is logged when the app starts. Check Logcat:

adb logcat | grep "Device ID"

Debugging

How do I enable debug logging?

Add this to your SDK configuration:

BlueshiftLogger.setLogLevel(BlueshiftLogger.VERBOSE)

See SDK setup → Enable logging.

How do I view SDK logs?

Use Logcat with the Blueshift tag:

adb logcat | grep "Blueshift"

Or use the Logcat window in Android Studio and filter by "Blueshift".


Live content

Live content returns null. Why?

A null response means no content is available. This happens when:

  1. The slot doesn't exist in the dashboard
  2. No active campaign is targeting the slot
  3. The campaign is not targeting the current user
  4. User identity (email/customer ID) is not set

Ensure user identity is set using identifyUser() before fetching live content.


General troubleshooting

The app crashes after adding the SDK. What should I check?

  1. Verify all dependencies are added correctly in build.gradle
  2. Check ProGuard rules if using code obfuscation
  3. Look for error messages in Logcat
  4. Ensure Application class is registered in AndroidManifest.xml

How do I contact support?

For issues not covered here, contact Blueshift Support.


Reference documentation